Folkert Bleichrodt
10/24/2023, 4:49 PMKyler Suden
10/24/2023, 10:33 PM@task(retries=3, retry_delay_seconds=10, timeout_seconds=600)
These parameters say that if a task fails, it will be reran a maximum of 3 times, with a 10 second delay in between. timeout_seconds defines how long a task can run before it gets given a status of "failed". So if any of these tasks take over 600 seconds, they will be killed and retried if they have not been retried the maximum amount of times. If a task fails more than 3 times in a row, you more than likely should restructure your code to fail less often.
As far as your usecase, if I am understanding correctly, a task raising an exception is not a "fail". Catching errors with exceptions is used explicitly for this purpose, catching errors and not making your code fail. You can have 10 execptions raised and still have a status of "successfully ran" because it did in fact run successfully. You caught the errors as exceptions, allowing your code to continue successfully. If you want the code to fail and retry you would need to remove the exceptions so that task actually fails, or write some logic to handle your exceptions differently.