YieldStudio / laravel-expo-notifier

Easily manage Expo notifications with Laravel. Support batched notifications.
MIT License
29 stars 11 forks source link

Prevent CheckTickets sometimes stucked in while loop #22

Open dtangdev opened 9 months ago

dtangdev commented 9 months ago
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