This commit is contained in:
Timothy Jaeryang Baek
2026-04-19 22:33:32 +09:00
parent 98c4f264e4
commit 42694c7c0c
10 changed files with 42 additions and 8 deletions
+4
View File
@@ -126,6 +126,10 @@ async def automation_worker_loop(app) -> None:
log.info(f'Automation worker started (poll interval: {AUTOMATION_POLL_INTERVAL}s)')
while True:
try:
if not getattr(app.state.config, 'ENABLE_AUTOMATIONS', False):
await asyncio.sleep(AUTOMATION_POLL_INTERVAL)
continue
async with get_async_db() as db:
batch = await Automations.claim_due(int(time.time_ns()), limit=10, db=db)
if batch: