Jacob Marcil
02/20/2024, 2:51 PMScout
02/20/2024, 2:51 PMpython from dagster import op, RetryPolicy @op(retry_policy=RetryPolicy(max_retries=3)) def my_op(context): # Your op logic here pass
In this example, my_op
will be retried up to three times if it fails. However, this does not inherently track an increment value within the op. If you need to track an increment value that persists across retries or runs, you would likely need to store this value externally, such as in a database or a file, and then read it when the op starts. This way, if the op fails and is retried, it can read the last known increment value and proceed from there. Remember that the specifics of how to implement this depend on your particular use case and the nature of the increment value you're tracking. The documentation does not provide a specific pattern for this scenario, so you would need to design a custom solution that fits your requirements.