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 remaining CLI args for flask rq worker. #122

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Jacoberts
Copy link

This resolves #121

matt-takumi added a commit to TakumiHQ/Flask-RQ2 that referenced this pull request Feb 23, 2023
@matt-takumi
Copy link

@Jacoberts I tried this in my fork of the repository but the --with-scheduler argument doesn't seem to create a scheduler that works - the logs say a scheduler has started, but it doesn't seem to pick up any jobs:

Worker rq:worker:f2a74e6c9b7c4aee811a62f7aac2e9c7: started, version 1.13.0
Subscribing to channel rq:pubsub:f2a74e6c9b7c4aee811a62f7aac2e9c7
*** Listening on default...
Scheduler for default started with PID 9

When I brought my dedicated scheduler online the jobs started processing again. I'm not sure where the issue is exactly though.

@Jacoberts
Copy link
Author

Hi @matt-takumi, I have always found the RQ scheduler to be a little mysterious, and have avoided it for that reason. I looked into this error a little, and found that, based on your logs, the --with-scheduler flag is correctly being recognized:

My only remaining hypothesis: are your jobs on the default queue?

@matt-takumi
Copy link

It's an interesting problem, because after adding the scheduled jobs via the flask-rq2 decorator they were picked up by the dedicated scheduler, but not via the one with the worker. I'll do some more exploration and feedback.

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.

Support rq worker --max-jobs flag
2 participants