@php $toneLabels = ['ok' => 'Ativo', 'warn' => 'Atenção', 'bad' => 'Offline']; $tone = (string) ($payload['worker']['tone'] ?? 'bad'); $toneLabel = $toneLabels[$tone] ?? 'Indisponível'; $statusLabel = static fn (string $status): string => match ($status) { 'completed' => 'Concluído', 'queued' => 'Pendente', 'running' => 'Executando', 'failed' => 'Falhou', default => $status, }; @endphp Diagnóstico do worker · OmniAURIOS

Diagnóstico do worker

Leitura externa do cron, heartbeat e filas do OmniAURIOS.

Gerado em {{ $payload['generated_at'] ?? '—' }}
Ver JSON
@if(isset($payload['error']))
Falha na consulta

{{ $payload['error_message'] ?? $payload['error'] }}

@else
{{ $toneLabel }}

{{ $payload['worker']['title'] ?? '—' }}

{{ $payload['worker']['detail'] ?? '—' }}

Heartbeat
{{ $payload['worker']['heartbeat_at'] ?? '—' }}
Pendentes{{ $payload['worker']['stats']['queued'] ?? 0 }}
Executando{{ $payload['worker']['stats']['running'] ?? 0 }}
Concluídos{{ $payload['worker']['stats']['completed'] ?? 0 }}
Falhos{{ $payload['worker']['stats']['failed'] ?? 0 }}

Filas

limites e alertas atuais
@foreach(($payload['queues'] ?? []) as $name => $queue)
{{ $name }}{{ $queue['tone'] ?? '—' }}

Pendentes: {{ $queue['stats']['queued'] ?? 0 }} · Rodando: {{ $queue['stats']['running'] ?? 0 }} · Falhos: {{ $queue['stats']['failed'] ?? 0 }} · Limite: {{ $queue['max_queued'] ?? '—' }}

@if(($queue['alerts'] ?? []) !== [])

{{ implode(' · ', $queue['alerts']) }}

@endif
@endforeach

Últimos jobs

sem payloads
@forelse(($payload['recent_jobs'] ?? []) as $job) @empty @endforelse
IDFilaHandlerStatusTentativasAtualizadoErro
{{ $job['id'] }}{{ $job['queue'] }}{{ $job['handler'] }}{{ $statusLabel($job['status']) }}{{ $job['attempts'] }}{{ $job['updated_at'] ?? '—' }}{{ $job['last_error'] ?? '—' }}
Nenhum job pendente.
@if(($payload['failed_jobs'] ?? []) !== [])

Jobs falhos

Estes são falhos definitivos ainda mantidos no histórico.

@foreach($payload['failed_jobs'] as $job) @endforeach
IDFilaHandlerTentativasFalhou emErro
{{ $job['id'] }}{{ $job['queue'] }}{{ $job['handler'] }}{{ $job['attempts'] }}{{ $job['failed_at'] }}{{ $job['last_error'] }}
@endif @endif