Files
SkinbaseNova/app/Support/Queues/QueuedJobClassMatcher.php
klevze 8a80aae21e Ship production optimization M1-M12.5A: queues, metrics, HTTP observability, and vector search reliability.
Keep similar-ai from tripping the global circuit on a lone URL 502, clamp Qdrant search to 100, and add Server-Timing plus slow-request logging. Studio shared props, Academy S3 exists caching, heat chunking, and Redis/scheduler hygiene stay in this rollout.
2026-08-25 07:58:47 +02:00

34 lines
769 B
PHP

<?php
declare(strict_types=1);
namespace App\Support\Queues;
final class QueuedJobClassMatcher
{
public static function className(string $rawPayload): ?string
{
$decoded = json_decode($rawPayload, true);
if (! is_array($decoded)) {
return null;
}
$display = $decoded['displayName'] ?? null;
if (is_string($display) && $display !== '') {
return $display;
}
$command = $decoded['data']['commandName'] ?? null;
if (is_string($command) && $command !== '') {
return $command;
}
return null;
}
public static function isClass(string $rawPayload, string $class): bool
{
return self::className($rawPayload) === $class;
}
}