SurfSense/surfsense_backend/app/automations/actions/agent_task
CREDO23 958bf9f95a fix(automations/agent_task): use in-memory checkpointer to avoid Celery PoolTimeout
The shared AsyncPostgresSaver caches DB connections in a module-level
pool. Cached connections are bound to the asyncio loop that opened
them, but `run_async_celery_task` discards the loop on each task's
exit — so after the first task the pool holds connections pointing
to a dead loop, and the next automation hangs 30s before failing
with `PoolTimeout: couldn't get a connection after 30.00 sec`.

Swap agent_task to `InMemorySaver`; automation runs only need state
within one Celery task, so nothing is lost. Site-local TODO tracks
the proper future fix (dispose the checkpointer pool around each
Celery task, mirroring `_dispose_shared_db_engine`).
2026-05-28 21:10:24 +02:00
..
__init__.py refactor(automations): vertical-slice actions and triggers by domain 2026-05-27 17:07:20 +02:00
auto_decide.py feat(automations): wire agent_task to multi_agent_chat with auto-approve loop 2026-05-27 17:02:44 +02:00
definition.py feat(automations): static_inputs on triggers + vertical-slice api/services 2026-05-27 21:21:43 +02:00
dependencies.py fix(automations/agent_task): use in-memory checkpointer to avoid Celery PoolTimeout 2026-05-28 21:10:24 +02:00
factory.py refactor(automations): vertical-slice actions and triggers by domain 2026-05-27 17:07:20 +02:00
finalize.py feat(automations): wire agent_task to multi_agent_chat with auto-approve loop 2026-05-27 17:02:44 +02:00
invoke.py refactor(automations): vertical-slice actions and triggers by domain 2026-05-27 17:07:20 +02:00
params.py refactor(automations): vertical-slice actions and triggers by domain 2026-05-27 17:07:20 +02:00