Orchestrate an abandonment from a deal's recorded job 🟩

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Daniel Roth 2026-07-07 15:41:09 +00:00
parent 83af3ff4d0
commit ae1b1a9776

View file

@ -273,7 +273,17 @@ class AbriOrchestrator:
def abandon_job(
self, abandonment: DealAbandonment
) -> AbandonJobOrchestrationResult:
raise NotImplementedError
job_no = self._deal_database.job_no_for_deal(abandonment.deal_id)
if job_no is None:
raise JobNoNotYetRecordedError(deal_id=abandonment.deal_id)
return self._abri.abandon_job(
AbandonJobRequest(
job_no=job_no,
reason=abandon_reason_for_outcome(abandonment.outcome),
date_abandoned=self._clock(),
)
)
def log_job(self, booking: ConfirmedSurveyBooking) -> LogJobOrchestrationResult:
descriptions = build_job_descriptions(booking.deal_name)