mirror of
https://github.com/idrainformatica/PecFlow.git
synced 2026-06-16 12:45:42 +02:00
Fix parsing
This commit is contained in:
@@ -182,6 +182,21 @@ async def send_pec(ctx: dict[str, Any], send_job_id: str) -> dict:
|
||||
"message_id_header": message_id_header,
|
||||
})
|
||||
|
||||
# ── Enqueue sync_mailbox dopo 60s per rilevare ricevute rapidamente ──
|
||||
# La connessione IMAP IDLE potrebbe avere un heartbeat di 28 minuti;
|
||||
# forziamo un sync immediato per non attendere il prossimo ciclo IDLE.
|
||||
try:
|
||||
await redis_client.enqueue_job(
|
||||
"sync_mailbox",
|
||||
str(mailbox.id),
|
||||
_defer_by=timedelta(seconds=60),
|
||||
)
|
||||
logger.info(
|
||||
f"[send_pec] sync_mailbox schedulato per {mailbox.id} tra 60s"
|
||||
)
|
||||
except Exception as e:
|
||||
logger.warning(f"[send_pec] Errore enqueue sync_mailbox post-invio: {e}")
|
||||
|
||||
# ── Enqueue watch_receipt dopo 24h ────────────────────────────────
|
||||
try:
|
||||
await redis_client.enqueue_job(
|
||||
|
||||
Reference in New Issue
Block a user