Flask-RQ2 icon indicating copy to clipboard operation
Flask-RQ2 copied to clipboard

Add remaining CLI args for flask rq worker.

Open Jacoberts opened this issue 2 years ago • 3 comments

This resolves #121

Jacoberts avatar Sep 06 '22 21:09 Jacoberts

@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.

matt-takumi avatar Feb 23 '23 14:02 matt-takumi

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?

Jacoberts avatar Feb 23 '23 18:02 Jacoberts

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.

matt-takumi avatar Feb 24 '23 14:02 matt-takumi