feat: support autonomous campaign schedule results

This commit is contained in:
2026-08-20 21:10:04 +02:00
parent 4f4007aff1
commit 4b0737e1cd
3 changed files with 118 additions and 2 deletions
+11 -1
View File
@@ -729,7 +729,7 @@ def dispatch_campaign_schedules(
tenant_id: str | None = None,
limit: int = 50,
):
"""Prepare due campaign drafts; delivery always remains a separate action."""
"""Prepare manual drafts or governed autonomous Mail commands for due schedules."""
from govoplan_core.db.session import get_database
@@ -738,11 +738,21 @@ def dispatch_campaign_schedules(
defaults = {
"selected": 0,
"prepared": 0,
"autonomous_prepared": 0,
"failed": 0,
"completed": 0,
"coalesced": 0,
"duplicates": 0,
"deferred": 0,
"campaign_ids": [],
"operator_actions": [],
"refreshed": {
"checked": 0,
"accepted": 0,
"uncertain": 0,
"failed": 0,
"skipped": 0,
},
}
if not registry.has_capability(CAPABILITY_CAMPAIGNS_SCHEDULES):
return defaults
+1 -1
View File
@@ -108,7 +108,7 @@ class CampaignDeliveryTaskProvider(Protocol):
@runtime_checkable
class CampaignScheduleProvider(Protocol):
"""Durable boundary for preparing due recurring Campaign drafts."""
"""Durable boundary for due manual drafts and governed autonomous occurrences."""
def dispatch_due(
self,