mirror of
https://github.com/idrainformatica/PecFlow.git
synced 2026-06-16 12:45:42 +02:00
fase 4
This commit is contained in:
+5
-2
@@ -24,7 +24,9 @@ from arq.connections import RedisSettings
|
||||
|
||||
from app.config import get_settings
|
||||
from app.imap.pool import MailboxPool
|
||||
from app.jobs.send_pec import send_pec
|
||||
from app.jobs.sync_mailbox import sync_mailbox
|
||||
from app.smtp.receipt_watcher import watch_receipt
|
||||
from app.storage.minio_client import ensure_bucket_exists
|
||||
|
||||
settings = get_settings()
|
||||
@@ -127,7 +129,7 @@ class WorkerSettings:
|
||||
"""Configurazione del worker arq."""
|
||||
|
||||
# Funzioni/job registrati
|
||||
functions = [sync_mailbox, health_check]
|
||||
functions = [sync_mailbox, send_pec, watch_receipt, health_check]
|
||||
|
||||
# Callbacks lifecycle
|
||||
on_startup = on_startup
|
||||
@@ -140,7 +142,8 @@ class WorkerSettings:
|
||||
max_jobs = 20
|
||||
|
||||
# Timeout per ogni job (secondi)
|
||||
job_timeout = 300
|
||||
# send_pec può richiedere più tempo su SMTP lenti
|
||||
job_timeout = 120
|
||||
|
||||
# Retry automatico in caso di errore
|
||||
max_tries = 3
|
||||
|
||||
Reference in New Issue
Block a user