Resolve campaign worker jobs to tenants
This commit is contained in:
@@ -690,6 +690,10 @@ def policy_context_capability(context: object) -> CampaignPolicyContextService:
|
||||
|
||||
|
||||
class CampaignDeliveryTaskService(CampaignDeliveryTaskProvider):
|
||||
def tenant_id_for_job(self, session: object, *, job_id: str) -> str | None:
|
||||
job = session.get(CampaignJob, job_id) # type: ignore[attr-defined]
|
||||
return job.tenant_id if job is not None else None
|
||||
|
||||
def send_campaign_job(self, session: object, *, job_id: str, enqueue_imap_task: bool = True) -> Mapping[str, object]:
|
||||
from govoplan_campaign.backend.sending.jobs import send_campaign_job
|
||||
|
||||
|
||||
Reference in New Issue
Block a user