From 98f5d4539181ca65c631c74b1f66792b0694f72d Mon Sep 17 00:00:00 2001 From: tcely Date: Sun, 15 Jun 2025 11:29:12 -0400 Subject: [PATCH] Accept queue name strings as well --- tubesync/common/huey.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tubesync/common/huey.py b/tubesync/common/huey.py index 8f9cea5a..a7fb2403 100644 --- a/tubesync/common/huey.py +++ b/tubesync/common/huey.py @@ -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))