laravel-expo-notifier icon indicating copy to clipboard operation
laravel-expo-notifier copied to clipboard

Prevent CheckTickets sometimes stucked in while loop

Open dtangdev opened this issue 2 years ago • 0 comments

while ($ticketStorage->count() > 0) {
    $tickets = $ticketStorage->retrieve();
    $ticketIds = $tickets->pluck('id')->toArray();


    $response = $expoNotificationsService->receipts($ticketIds);
    if ($response->isEmpty()) {
        break;
    }

    $this->check($ticketStorage, $tickets, $response);
}

When ->receipts() has an error, the job hangs, because it still stucks in the while loop

dtangdev avatar Nov 15 '23 14:11 dtangdev