feat: support autonomous campaign schedule results
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user