Closed EvelynArinaitwe closed 2 years ago
Which is your DJANGO_HUEY setting?
It will work if you do the following:
from django_huey import db_task, on_startup, signal
from huey_monitor.tasks import startup_handler, store_signals
signal(queue='fast')(store_signals)
on_startup(queue='fast')(startup_handler)
@db_task(queue='fast')
def slow_task(parameter):
import time
time.sleep(60)
I'll be adding a comment in the README and maybe a configuration flag to register those signals automatically.
If I have 2 queues: general
and db
I should do this?
signal(queue="general")(store_signals)
on_startup(queue="general")(startup_handler)
signal(queue="db")(store_signals)
on_startup(queue="db")(startup_handler)
What if I have multiple tasks.py
files for each django application?
Do I need to make this setup for each of them?
Anyway it does not work for me :(
I use djangohuey --queue [name of queue] to run consumer, this runs my task, but the django-huey-monitor does not track the tasks, or are not created in the huey_monitor database tables. Which configuration am I missing?