-
-
Notifications
You must be signed in to change notification settings - Fork 313
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
feat(remove/job): remove a particular job reference from the schedule… #90
Conversation
6ed05ca
to
0723269
Compare
Thanks for the feature PR! |
40d23a9
to
78817be
Compare
78817be
to
9e9b239
Compare
9e9b239
to
48ec719
Compare
please add a test to the example_test.go file so that it appears in the go docs
48ec719
to
61a8323
Compare
…r after the last execution of the job
61a8323
to
836d0ae
Compare
Thank you! |
Hi, Thanks for adding this feature. Is it possible to create a release tag with this change? |
@apremalal yes we are working on a release soon. This feature may change slightly before the release, but the functionality will be available. |
@Streppel you had mentioned why not just remove after the run limit is reached. I think having this available as is with a specific flag is valuable, because a user may not be default want to remove the job. For example, start a job with a limit of 1 run, then later edit the run limit to 2, and then later 3, etc. With this flag, we allow specifically asking to remove the job after the limit is reached. |
@JohnRoesler I see... Let's keep it that way, then; I think this makes sense. Even though, creating a new job would be a simpler way of achieving the same result, right? |
…r after the last execution of the job
What does this do?
With the scheduler we have the possibility to run a Job only once but when the Job has finished its execution we still have a reference in the Scheduler while it will not be used anymore this can lead to keep obsoletes scheduler Jobs references.
This PR allow the user to add a flag
RemoveAfterLastExec
in order to remove the job after the last job execution.Which issue(s) does this PR fix/relate to?
resolves #85
List any changes that modify/break current functionality
Have you included tests for your changes?
Yes
Did you document any new/modified functionality?
example_test.go
README.md
Notes