Closed nathan30 closed 4 years ago
If needed, you could see both of the files, here : https://gitlab.com/edissyum/opencapture/opencaptureforinvoices/-/tree/master/bin/src
I see that both tasks are sent the default queue. You can separate them by providing a queue name in task decorator.
In main.py change:
@OCforInvoices.task(queue='invoices')
def launch(args):
If you do this, tasks will be sent to a queue named invoices
.
Then you can run a worker that consumes from that queue:
$ kuyruk --app bin.src.main.OCforInvoices worker --queue invoices
You can give a different queue name in your other main_splitter.py
file.
Oh I see, thanks a lot !
Hi, On my project I created two worker. On the main.py, I have the @OCforInvoices.task decorator On the main_splitter.py I have the @OCforInvoices_Sep.task decorator
When I launch a process using main.py, is the OCforInvoices worker is busy, it will use OCforInvoices_Sep and vice versa. Is that normal ?
How could I avoid that ?