Accept queue name strings as well

This commit is contained in:
tcely authored and GitHub committed 2025-06-15 11:29:12 -04:00
1 parent 97ef9e2f27
commit 98f5d45391
1 file changed
+3
+3
View File
@@ -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))