Skip to content

Migrate worker to native rq process #2227

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

Merged
merged 9 commits into from
Aug 7, 2025
Merged

Migrate worker to native rq process #2227

merged 9 commits into from
Aug 7, 2025

Conversation

gantoine
Copy link
Member

@gantoine gantoine commented Aug 7, 2025

Description
Explain the changes or enhancements you are proposing with this pull request.

Hot on the heels of #2224, we do the same thing but for the worker. Task initialization now happens in main.py since worker.py was purged.

Checklist
Please check all that apply.

  • I've tested the changes locally
  • I've updated relevant comments
  • I've assigned reviewers for this PR
  • I've added unit tests that cover the changes

@gantoine gantoine requested review from adamantike and Copilot August 7, 2025 02:11
Copy link

trunk-io bot commented Aug 7, 2025

Running Code Quality on PRs by uploading data to Trunk will soon be removed. You can still run checks on your PRs using trunk-action - see the migration guide for more information.

Copilot

This comment was marked as outdated.

Copy link

github-actions bot commented Aug 7, 2025

Test Results

548 tests  ±0   547 ✅ ±0   59s ⏱️ -1s
  1 suites ±0     1 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit c4ea27b. ± Comparison against base commit ebe271d.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Aug 7, 2025

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
8759 6171 70% 0% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
backend/main.py 82% 🟢
TOTAL 82% 🟢

updated for commit: c4ea27b by action🐍

@gantoine gantoine requested a review from Copilot August 7, 2025 13:34
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR migrates the worker process to use native RQ commands instead of a custom Python worker script. The main change removes the worker.py file and integrates task initialization into main.py, while updating deployment scripts to use the native rq worker and rqscheduler commands.

  • Removes custom worker.py script and moves scheduled task initialization to main.py
  • Updates deployment scripts to use native RQ commands (rq worker, rqscheduler)
  • Refactors watcher to work with watchmedo shell command instead of internal observer

Reviewed Changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
backend/worker.py Completely removed - worker functionality moved to native RQ
backend/main.py Added scheduled task initialization previously in worker.py
backend/watcher.py Refactored from observer pattern to shell command execution
entrypoint.sh Updated to use native RQ commands and watchmedo
docker/init_scripts/init Updated process management for native RQ commands
pyproject.toml Added watchmedo dependency
Dockerfile Added venv to PATH for RQ commands
DEVELOPER_SETUP.md Removed worker setup instructions
.vscode/tasks.json Removed worker launch task

Copy link
Contributor

@adamantike adamantike left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀🚀🚀

@gantoine gantoine merged commit 00c9d74 into master Aug 7, 2025
9 checks passed
@gantoine gantoine deleted the worker-native-process branch August 7, 2025 14:04
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