mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-07 14:15:44 +00:00
implement batch board notification system for schedule changes and updates
This commit is contained in:
@@ -153,6 +153,16 @@ export class BookingWindowService implements OnModuleInit {
|
||||
.update(s.id, { docReviewCompletedAt: now });
|
||||
s.docReviewCompletedAt = now;
|
||||
await this.advanceSchedule(s, effectiveWindowConfig(s, liveCfg), now);
|
||||
// The batch fill emits only for trains it actually reserved onto — this
|
||||
// covers the empty-pool case so every open board still refetches. Push
|
||||
// failures only log; the doc-review completion itself already persisted.
|
||||
try {
|
||||
this.gateway.emitBatchChanged(s.id, 'doc_review_completed');
|
||||
} catch (err) {
|
||||
this.logger.warn(
|
||||
`Batch-board push failed for ${s.id}: ${(err as Error).message}`,
|
||||
);
|
||||
}
|
||||
}
|
||||
const fresh = await this.trainSchedulesRepository.findById(scheduleId);
|
||||
return fresh ?? schedule;
|
||||
|
||||
Reference in New Issue
Block a user