Skip to content

The agent that grows with you

refactor(gateway): drop the unreachable concurrent.futures cancel arm from the notice callback

kshitijk4poor9989e152b0c9
diff --git a/gateway/cron_store_notices.py b/gateway/cron_store_notices.py
index 704e48d0381..3ea79b1b455 100644
--- a/gateway/cron_store_notices.py
+++ b/gateway/cron_store_notices.py
@@ -9,7 +9,6 @@ send path the state.db warning uses.
from __future__ import annotations
import asyncio
-import concurrent.futures
import contextlib
import logging
from pathlib import Path
@@ -66,7 +65,7 @@ def install_cron_store_notices(runner, loop: asyncio.AbstractEventLoop) -> None:
def _log_notice_failure(done, event: str, store: str) -> None:
try:
done.result()
- except (asyncio.CancelledError, concurrent.futures.CancelledError):
+ except asyncio.CancelledError:
return
except Exception: # the ticker thread already moved on: log, never raise
logger.warning("Cron store %s notice for %s failed", event, store, exc_info=True)