-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Support sidekiq balance strategy and dedicated queues
Add support for the `BalanceStrategy` config from `rusty-sidekiq` and default to `BalanceStrategy#RoundRobin` to ensure all queues have a chance to have their jobs run by default. Also add support for dedicated queues via the `service.sidekiq.queue-config` field. Queues listed in this field will run with a dedicated set of workers (equal to the `num-workers` sub-field for each queue).
- Loading branch information
1 parent
87020ff
commit 2e175e0
Showing
15 changed files
with
240 additions
and
15 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
25 changes: 25 additions & 0 deletions
25
...pshots/roadster__config__service__worker__sidekiq__deserialize_tests__sidekiq@case_7.snap
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
source: src/config/service/worker/sidekiq/mod.rs | ||
expression: sidekiq | ||
--- | ||
num-workers = 1 | ||
balance-strategy = 'none' | ||
queues = [] | ||
|
||
[redis] | ||
uri = 'redis://[Sensitive]' | ||
|
||
[redis.enqueue-pool] | ||
|
||
[redis.fetch-pool] | ||
|
||
[periodic] | ||
stale-cleanup = 'auto-clean-stale' | ||
|
||
[app-worker] | ||
max-retries = 5 | ||
timeout = true | ||
max-duration = 60 | ||
disable-argument-coercion = false | ||
|
||
[queue-config] |
25 changes: 25 additions & 0 deletions
25
...pshots/roadster__config__service__worker__sidekiq__deserialize_tests__sidekiq@case_8.snap
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
source: src/config/service/worker/sidekiq/mod.rs | ||
expression: sidekiq | ||
--- | ||
num-workers = 1 | ||
balance-strategy = 'round-robin' | ||
queues = [] | ||
|
||
[redis] | ||
uri = 'redis://[Sensitive]' | ||
|
||
[redis.enqueue-pool] | ||
|
||
[redis.fetch-pool] | ||
|
||
[periodic] | ||
stale-cleanup = 'auto-clean-stale' | ||
|
||
[app-worker] | ||
max-retries = 5 | ||
timeout = true | ||
max-duration = 60 | ||
disable-argument-coercion = false | ||
|
||
[queue-config] |
28 changes: 28 additions & 0 deletions
28
...pshots/roadster__config__service__worker__sidekiq__deserialize_tests__sidekiq@case_9.snap
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
source: src/config/service/worker/sidekiq/mod.rs | ||
expression: sidekiq | ||
--- | ||
num-workers = 1 | ||
balance-strategy = 'round-robin' | ||
queues = [] | ||
|
||
[redis] | ||
uri = 'redis://[Sensitive]' | ||
|
||
[redis.enqueue-pool] | ||
|
||
[redis.fetch-pool] | ||
|
||
[periodic] | ||
stale-cleanup = 'auto-clean-stale' | ||
|
||
[app-worker] | ||
max-retries = 5 | ||
timeout = true | ||
max-duration = 60 | ||
disable-argument-coercion = false | ||
[queue-config.bar] | ||
num-workers = 100 | ||
|
||
[queue-config.foo] | ||
num-workers = 10 |
This file contains 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
This file contains 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
Oops, something went wrong.