campaign sending prototype
This commit is contained in:
@@ -9,6 +9,8 @@ from typing import Any
|
||||
|
||||
from sqlalchemy.orm import Session
|
||||
|
||||
from govoplan_core.settings import settings as core_settings
|
||||
|
||||
from govoplan_campaign.backend.db.models import (
|
||||
Campaign,
|
||||
CampaignIssue,
|
||||
@@ -89,6 +91,7 @@ def _load_delivery_info(version: CampaignVersion | None, jobs: list[CampaignJob]
|
||||
"imap_config_fingerprint": None,
|
||||
"estimated_remaining_send_seconds": None,
|
||||
"estimated_remaining_send_human": None,
|
||||
"background_workers_enabled": bool(core_settings.celery_enabled),
|
||||
}
|
||||
if not version or not isinstance(version.execution_snapshot, dict):
|
||||
default["load_error"] = "No execution snapshot exists; rebuild the current locked version before delivery."
|
||||
@@ -131,6 +134,7 @@ def _load_delivery_info(version: CampaignVersion | None, jobs: list[CampaignJob]
|
||||
"imap_config_fingerprint": snapshot.imap_config_fingerprint,
|
||||
"estimated_remaining_send_seconds": estimated_seconds,
|
||||
"estimated_remaining_send_human": _human_duration(estimated_seconds),
|
||||
"background_workers_enabled": bool(core_settings.celery_enabled),
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user