Hello, how can I get the currently running task's retry attempt? Is it possible to get the elapsed time of the retry delay during the run time as well? Thanks in advance.
c
Chris White
08/19/2019, 4:05 AM
You can get the retry count by accessing `prefect.context.get("task_run_count", 1)`; for “the elapsed time of the retry delay”, you might be able to infer that from one of the datetime objects that are also present in context (more info on that here: https://docs.prefect.io/api/unreleased/utilities/context.html)
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.