feat(sync): limit CTS fetch to next 10 services

This commit is contained in:
Thorsten Bus 2026-03-02 12:04:24 +01:00
parent 89ddbba737
commit a5a520c754

View file

@ -156,7 +156,9 @@ private function fetchEvents(): array
$fetcher = $this->eventFetcher ?? function (): array { $fetcher = $this->eventFetcher ?? function (): array {
$this->configureApi(); $this->configureApi();
return EventRequest::where('from', Carbon::now()->toDateString())->get(); return EventRequest::where('from', Carbon::now()->toDateString())
->where('to', Carbon::now()->addMonths(3)->toDateString())
->get();
}; };
return $this->logApiCall('fetchEvents', 'events', fn (): array => $fetcher()); return $this->logApiCall('fetchEvents', 'events', fn (): array => $fetcher());