mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-12 13:29:04 +00:00
Orchestrate an abandonment from a deal's recorded job 🟩
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
83af3ff4d0
commit
ae1b1a9776
1 changed files with 11 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue