Add num_workers config for sidekiq queue #823
Merged
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.
This PR updates rusty-sidekiq to the latest version, which added a way to configure the number of workers.
See https://github.com/film42/sidekiq-rs/pull/41/files
Seeing that the pg queue already supported this, I made the config parameter name the same and used the same default.
Ps. I'm pretty new to Rust and still learning daily, so please do suggest changes to make the code better or more in line with idiomatic Rust.
The rusty-sidekiq update also brings in a way to use cancellation tokens to wait for currently processing jobs to be done before killing the process. If this PR is accepted, I'll try to incorporate the cancellation feature into Loco next.