fix(kanban): reap notify subscriptions for stale blocked tasks too
purge_stale_done_notify_subs only matched status='done', so a task the circuit breaker parked in 'blocked' kept its notify-sub rows forever on boards that never archive. Widen the predicate to done OR blocked while keeping the existing age clause; backlog/ready cards are idle, not abandoned, and stay exempt (test_gc_spares_reopened_task_even_when_old). Watcher comment/log and docs updated to say done/blocked. Closes #100955 Co-authored-by: itsflownium <itsflownium@users.noreply.github.com>
This commit is contained in:
@@ -422,7 +422,7 @@ class GatewayKanbanWatchersMixin:
|
||||
if _gc_due:
|
||||
# Hourly (plus once at startup) stale-sub GC:
|
||||
# drop subscriptions for tasks that have been
|
||||
# ``done`` untouched past the retention
|
||||
# ``done``/``blocked`` untouched past the retention
|
||||
# window. Best-effort — a failed sweep never
|
||||
# blocks delivery; the next hourly gate
|
||||
# retries it.
|
||||
@@ -433,7 +433,7 @@ class GatewayKanbanWatchersMixin:
|
||||
)
|
||||
if _purged:
|
||||
logger.info(
|
||||
"kanban notifier: purged %d stale done-task subscription(s) on board %s (retention %dd)",
|
||||
"kanban notifier: purged %d stale done/blocked-task subscription(s) on board %s (retention %dd)",
|
||||
_purged, slug, _gc_retention_days,
|
||||
)
|
||||
except Exception as _gc_exc:
|
||||
|
||||
Reference in New Issue
Block a user