Skip to content

Reload job functions when --watch detects a file change - #535

Open
Cherith1222 wants to merge 1 commit into
python-arq:mainfrom
Cherith1222:fix/429-watch-reload
Open

Cherith1222 wants to merge 1 commit into
python-arq:mainfrom
Cherith1222:fix/429-watch-reload

Conversation

@Cherith1222

Copy link
Copy Markdown

--watch restarted the same worker, so job functions imported at startup kept running after a file change. The settings module is re-imported and a new worker is started.

Fixes #429.

Cherith reviewed this diff and confirmed it with the person who helped draft it.
Drafted with Cursor. Model: Grok 4.7.

--watch restarted the same worker, so edited job functions kept running. Re-import the settings module and start a new worker.

AI-assisted (Cursor)
@codecov-commenter

Copy link
Copy Markdown

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

Codecov Report

❌ Patch coverage is 70.27027% with 11 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
arq/cli.py 70.27% 7 Missing and 4 partials ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
@@            Coverage Diff             @@
##             main     #535      +/-   ##
==========================================
- Coverage   96.27%   94.99%   -1.29%     
==========================================
  Files          11       11              
  Lines        1074     1119      +45     
  Branches      209      152      -57     
==========================================
+ Hits         1034     1063      +29     
- Misses         19       31      +12     
- Partials       21       25       +4     
Files with missing lines Coverage Δ
arq/cli.py 87.35% <70.27%> (-12.65%) ⬇️

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Harness.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This branch has not been deployed

No deployments
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.

[BUG] --watch does not reload code changes, despite console output saying so "files changed, reloading arq worker..."

2 participants