Anlass 06.10.2026: Nach dem Deploy von v1.3.0 hat queue:restart den Worker beendet, Supervisor lief nicht, über eine Stunde blieben KI-Prüfungen und Mails liegen, ohne dass es auffiel. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
31 lines
778 B
PHP
31 lines
778 B
PHP
<?php
|
|
|
|
namespace App\Jobs\Monitoring;
|
|
|
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
|
use Illuminate\Foundation\Queue\Queueable;
|
|
use Illuminate\Support\Facades\Cache;
|
|
|
|
/**
|
|
* Test-Job für `monitoring:queue-probe`: tut nichts außer zu quittieren,
|
|
* dass ein Worker ihn abgeholt hat. Läuft auf `default` — der Worker hört
|
|
* auf `classification,default`.
|
|
*/
|
|
class QueueProbe implements ShouldQueue
|
|
{
|
|
use Queueable;
|
|
|
|
public int $tries = 1;
|
|
|
|
public function __construct(public string $token) {}
|
|
|
|
public static function cacheKey(string $token): string
|
|
{
|
|
return 'monitoring:queue-probe:'.$token;
|
|
}
|
|
|
|
public function handle(): void
|
|
{
|
|
Cache::put(self::cacheKey($this->token), now()->toIso8601String(), now()->addMinutes(10));
|
|
}
|
|
}
|