Open dhhagan opened 5 years ago
Hi I just want to ask for help how to run flask rq command in shell. I installed the flask_cli and try to run it, it show No shch command "rq".
I use Flask-RQ2 with supervisord. The trick is to run the command from inside the venv like this:
[program:rq-app]
command=/path/to/venv/bin/flask rq worker my-app-queue
For whatever reason, launching flask-rq2 from supervisord seems to be giving me incredible difficulty which I have never encountered using vanilla rq or even running a Flask app with RQ2 in docker. And of course, it seems that supervisord makes debugging incredibly difficult.
Currently, I have a fairly straight-forward Flask app which is running on an Ubuntu server. Everything is inside a virtual environment, and I am launching as follows:
rq.conf
boot-workers.sh
Whenever I log in and launch
boot-workers
manually, everything works like a charm. With supervisord, it launches for a few seconds before exiting (with status 1) with the following error:It appears the virtual environment isn't being activated or something like that, though I'm not sure why. Has anyone successfully launched rq2 from supervisord? If so, can someone provide some debugging advice and/or an example? Thanks!