Skip to content
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

add workers arg to CLI #496

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

add workers arg to CLI #496

wants to merge 2 commits into from

Conversation

Graeme22
Copy link

Description

This PR adds a new integer argument, --workers (or -w), to the CLI. This will cause N-1 additional worker processes to be spawned with the same configuration. This should be useful for the common case where more than one worker per machine/container is desired.

Usage

arq --workers 4 example.WorkerSettings

This also works with the --watch flag: all workers will be restarted upon the detection of changes.

@codecov-commenter
Copy link

codecov-commenter commented Jan 28, 2025

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 75.00000% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
arq/cli.py 75.00% 2 Missing and 1 partial ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

@@            Coverage Diff             @@
##             main     #496      +/-   ##
==========================================
- Coverage   96.27%   95.77%   -0.51%     
==========================================
  Files          11       11              
  Lines        1074     1088      +14     
  Branches      209      195      -14     
==========================================
+ Hits         1034     1042       +8     
- Misses         19       23       +4     
- Partials       21       23       +2     
Files with missing lines Coverage Δ
arq/cli.py 95.23% <75.00%> (-4.77%) ⬇️

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7a911f3...b5a92ab. Read the comment docs.

fix test

add workers arg to CLI

fix test

try again

add sleep
@Graeme22
Copy link
Author

Graeme22 commented Jan 28, 2025

The test seems to not be deterministic, open to suggestions on how to fix that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants