tick(); } catch (\Throwable $error) { fwrite(STDERR, 'cloud worker temporarily unavailable: ' . get_class($error) . PHP_EOL); if ($once) { return 1; } $worked = false; } // SMTP is deliberately isolated from the lifecycle process so a // slow mail server can never delay expiry or traffic policies. if (!$policyOnly) { try { CloudInvoiceService::deliverReminders(1); } catch (\Throwable $error) { fwrite(STDERR, 'cloud notification mail temporarily unavailable: ' . get_class($error) . PHP_EOL); } } if (!$once && !$worked) { usleep(1000000); } } while (!$once); return 0; } }