Add recurring scheduler to async-job server (workers + scheduler), with logs, aliases, and tests #15
+1,843
−10
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.
Hi Samuel,
Since recurring jobs are important, but this doesn't have that. So I implement it. So what I want is API, config as close as Solid Queue as possible since it is the default of Rails 8.
I test your
async-cron
, but I feel the style of solid queue make more sense. Just define arecurring.yml
, then done. So now, I'm not sure how we handle workers and schedulers better. Just implement initial concept, by default we will have 1 scheduler, and other workers behave as same as the old way.My concern is now we have a lot of ENV to remember, should we just read the queue.yml config of Solid Queue. Also should we handle scheduler redis here or in
async-job-processor-redis
.So please review, and give me some direction.
Summary:
Why:
Key changes:
Defaults and behavior:
Configuration (env)
Redis keys (if Redis enabled)
Example schedule
config/recurring.yml:
Backwards compatibility
Test plan
Files worth a look