rq-win
rq-win copied to clipboard
manage.py rqworker: error: unrecognized arguments: -w
Hi Guys, to implement this Worker I have to add a new folder in the project folder or in my app folder, if I add worker.py in my main app the result is what you look in the photos
This is the app scheme HONEYPOT that contains web_project and variables
The documentation on this repo describes how to start the worker with rq alone (rqworker -w rq_win.WindowsWorker
) but you are (I think) using the django-rq module to integrate rq with django. That module enables a django management command which has different arguments than the plain rq package, and the usage is documented here: https://github.com/rq/django-rq#running-workers
In short, you need to replace -w
with --worker-class
.
It's working thanks, but in this way i can run tasks in async o sync mode?
The limitations of rq-win are described in the readme:
Since Windows does not support fork(), we execute all work in the main worker thread instead of forking off a separate worker process. As a result, workers may not be as stable and crash resistant.
Further, since Windows does not support SIGALRM, WindowsWorkers do not provide any of the work timeout controls that normal workers provide.
However, the worker is still async with respect to whatever process (presumably the Django request handler) puts the work items into the queue. The fact you are running your workers with django-rq should not affect this.