mirror of
https://github.com/meeb/tubesync.git
synced 2025-06-17 10:36:35 +00:00
Accept queue name strings as well
This commit is contained in:
parent
97ef9e2f27
commit
98f5d45391
@ -26,6 +26,9 @@ def h_q_tuple(q, /):
|
||||
|
||||
|
||||
def h_q_reset_tasks(q, /, *, maint_func=None):
|
||||
if isinstance(q, str):
|
||||
from django_huey import get_queue
|
||||
q = get_queue(q)
|
||||
# revoke to prevent pending tasks from executing
|
||||
for t in q._registry._registry:
|
||||
q.revoke_all(t, revoke_until=delay_to_eta(600))
|
||||
|
Loading…
Reference in New Issue
Block a user