Document how to update dynamic recurring tasks - #777
Merged
Conversation
The scheduler only detects dynamic tasks being created and deleted, so updating a SolidQueue::RecurringTask record in place isn't picked up until a restart. This is by design: the documented way to update a task is to unschedule it and schedule it again. This wasn't stated in the README and has caused some confusion (rails#738, and the closed rails#739 and rails#774), so spell it out in the dynamic tasks section.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #774 and #739, related to #738.
Updating a dynamic recurring task in place (e.g.
task.update!(schedule: ...)) isn't picked up by a running scheduler — by design, the way to update a task is to unschedule it and schedule it again, as @rosa explained in #739 (comment).Since this wasn't stated in the README's dynamic tasks section and has now come up a few times (#738 plus two PRs attempting the same fix), this adds a short paragraph spelling it out.