Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All jobs should be idempotent and have ability to be safely re-run. #741

Closed
vmatekole opened this issue Mar 2, 2021 · 3 comments
Closed

Comments

@vmatekole
Copy link

Please see #739 for details!

@michaelbromley
Copy link
Member

I'm not sure how we would ensure idempotence, since the actual work done by a job may be intrinsically not idempotent.

A good example is sending an email. The email will be sent (or at least attempted to be sent) for each run of the job.

But perhaps you mean it in the way that the running of the job instance should be idempotent, disregarding the side-effects resulting from whatever work is to be done by the job.

In this case, this is achievable. The basic idea is to set the job's state back to "PENDING", at which point the worker should pick it up again and run it.

@vmatekole
Copy link
Author

@michaelbromley Agree... Even those jobs that are intrinsically not idempotent they can be in the sense that we can confirm that the job was successfully complete under certain conditions. In the case of an email — ensuring the job checks that email is sent with no errors and SMTP connection closed successfully would at least ensure that repeat emails are not sent.

@martijnvdbrug
Copy link
Collaborator

Since this is an old issue, and the comments indicate workaround exists, I will close this issue

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

No branches or pull requests

3 participants