/
githubmirror
/
framework
Обзор
Документация
Войти
/
githubmirror
/
framework
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
13.x
src/Illuminate/Foundation/Cloud/AgentAwareLostConnectionDetector.php
32 строки
885 B
Kieran Brown
[13.x] Pop managed queue jobs from the cloud-agent instead of SQS (#60659)
03 июл 2026, 23:11
Не верифицирован
03 июл 2026, 23:11
27b2560
Код
Авторство
О чём код?
<?php namespace Illuminate\Foundation\Cloud; use Illuminate\Contracts\Database\LostConnectionDetector; use Throwable; /** * Treats an unreachable cloud-agent runtime socket as a lost connection so the * worker exits and the pod restarts — the only way to recover an agent that * has died in-pod. Every other exception is delegated to parent instance. */ class AgentAwareLostConnectionDetector implements LostConnectionDetector { /** * Create a new detector instance. */ public function __construct( protected LostConnectionDetector $detector, ) { // } /** * Determine if the given exception was caused by a lost connection. */ public function causedByLostConnection(Throwable $e): bool { return $e instanceof AgentUnreachableException || $this->detector->causedByLostConnection($e); } }