Skip to content

Conversation

JoshVanL
Copy link
Collaborator

@JoshVanL JoshVanL commented Oct 14, 2024

Based of dapr/proposals#66

Adds a FailurePolicy option to the Job API to allow re-triggering job which are marked as failed by the caller. Adds two types of policy; Drop and Constant. Drop has no retry policy, Constant will constantly retry the job trigger for a configurable interval, up to a configurable maximum number of retries (which could be infinite).

Note that the failure policy retry cadence has no effect on the actual Job schedule, meaning if a job was to be retired and eventually succeeded, the Job would continue to trigger at the origin configured schedule.

By default, all Jobs will have a Constant policy with a interval of 1s.

Based of dapr/proposals#66

Adds a `FailurePolicy` option to the `Job` API to allow re-triggering
job which are marked as failed by the caller. Adds two types of policy;
`Drop` and `Constant`. `Drop` has no retry policy, `Constant` will
constantly retry the job trigger for a configurable delay, up to a
configurable maximum number of retries (which could be infinite).

Note that the failure policy retry cadence has no effect on the actual
Job schedule, meaning if a job was to be retired and eventually
succeeded, the Job would continue to trigger at the origin configured
schedule.

By default, all Jobs will have a `Constant` policy with a delay of 1s.

Signed-off-by: joshvanl <[email protected]>
Signed-off-by: joshvanl <[email protected]>
// delay when the job fails to trigger.
message FailurePolicyConstant {
// delay is the constant delay to wait before retrying the job.
google.protobuf.Duration delay = 1;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: interval

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good, I agree 👍

Copy link
Contributor

@artursouza artursouza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a nit on the name since it is part of the public interface and can create ambiguity with delay from what users of reminders know.

@artursouza artursouza merged commit 05f7c29 into diagridio:master Oct 14, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants