Set Celery Beat task priority with `add_periodic_task()`

Viewed 30

I've searched extensively, but cannot find anything on this.

Is it possible to set a celery task priority for a celery beat task, when using add_periodic_task() something like:

sender.add_periodic_task(
    crontab(minute="*/5"),
    self_monitor_health_checks,
    priority=3,
)

Thanks for your help and input.

1 Answers

It turns out that the above does work, despite it being undocumented. You can set a priority like this:

sender.add_periodic_task(
    crontab(minute="*/5"),
    self_monitor_health_checks,
    priority=3,
)
Related