A Windows service that supervises Laravel queue workers with auto-restart, Git-based hot-reload, real-time job telemetry, and a web dashboard.
- Worker Supervision — Manages multiple
php artisan queue:workprocesses with exponential backoff and circuit breaker - Git Hot-Reload — Detects deployments and gracefully restarts workers
- Real-Time Job Tracking — Parses structured JSON telemetry from stdout for instant job visibility
- Database Integration — Reads MSSQL
jobs/failed_jobstables for complete queue state - Per-Queue Metrics — Average wait time, execution time, throughput per queue
- Web Dashboard — Live stats, worker management, job history at a glance
- Auto-Update — Checks GitHub Releases and self-updates with zero downtime
- Multi-Site — Monitor multiple Laravel applications from one instance
Grab the latest queue-watcher-windows-amd64.exe from Releases.
Copy queue-watcher.example.json → queue-watcher.json next to the exe:
{
"dashboard_addr": "0.0.0.0:9100",
"update": {
"enabled": true,
"repository": "clcarver/queue-watcher",
"companion_repository": "clcarver/queue-watcher-laravel",
"check_interval": 3600000000000
},
"sites": [
{
"id": "my-app",
"name": "My Laravel App",
"laravel_path": "C:\\path\\to\\laravel",
"git_branch": "main",
"workers": [
{
"label": "Default Worker",
"queue_connection": "database",
"queue_names": "default",
"max_memory_mb": 128,
"timeout_seconds": 60,
"tries": 3
}
],
"db_host_env": "DB_HOST",
"db_port_env": "DB_PORT",
"db_database_env": "DB_DATABASE",
"db_username_env": "DB_USERNAME",
"db_password_env": "DB_PASSWORD"
}
]
}The db_*_env fields are key names from your Laravel .env file. The app reads the .env and uses those keys to connect to MSSQL for live queue metrics.
# As Administrator
sc.exe create LaravelQueueWatcher binPath= "C:\path\to\queue-watcher.exe" start= auto
sc.exe description LaravelQueueWatcher "Supervises Laravel queue workers"
sc.exe failure LaravelQueueWatcher reset= 60 actions= restart/5000/restart/10000/restart/30000
sc.exe start LaravelQueueWatcherThe failure line ensures the service auto-restarts after self-updates.
Open http://localhost:9100 in your browser.
When update.enabled is true in config, the service:
- Checks GitHub Releases every
check_interval(default: 1 hour) - Compares the latest release tag against its built-in version
- Verifies the companion repository tag (default:
clcarver/queue-watcher-laravel) matches the release tag - Downloads the new binary if newer and compatible
- Replaces itself (rename trick for Windows) and exits
- Windows SCM auto-restarts the service with the new version
From the dashboard Updates button, you can also click Update Now to apply a compatible update immediately instead of waiting for the next interval.
.\queue-watcher.exe updatego build -ldflags "-X main.version=v0.1.0 -X main.commit=$(git rev-parse --short HEAD) -X main.buildDate=$(Get-Date -Format yyyy-MM-dd)" -o queue-watcher.exe ..\queue-watcher.exe runTag and push — GitHub Actions builds and publishes automatically:
git tag v1.0.0
git push origin v1.0.0For real-time job telemetry (zero-latency), add this to your AppServiceProvider::boot():
if ($this->app->runningInConsole()) {
Queue::before(function (JobProcessing $event) {
$this->logToJson('reserved', $event->job);
});
Queue::after(function (JobProcessed $event) {
$this->logToJson('completed', $event->job);
});
Queue::failing(function (JobFailed $event) {
$this->logToJson('failed', $event->job, $event->exception->getMessage());
});
}With the private method:
private function logToJson(string $status, $job, ?string $error = null): void
{
echo json_encode([
'telemetry' => true,
'status' => $status,
'job_id' => $job->getJobId(),
'job_name' => $job->resolveName(),
'queue' => $job->getQueue(),
'error' => $error,
'time' => now()->toISOString(),
]) . PHP_EOL;
}Queue Watcher parses these JSON lines from stdout in real-time — no database polling delay.
┌─────────────────────────────────────────────┐
│ Queue Watcher (Go binary) │
├─────────────┬───────────────┬───────────────┤
│ Supervisor │ Git Watcher │ Dashboard │
│ (workers) │ (hot-reload)│ (HTTP/API) │
├─────────────┴───────────────┴───────────────┤
│ Auto-Updater (GitHub) │
├─────────────────────────────────────────────┤
│ stdout JSON telemetry │ MSSQL polling │
│ (primary, instant) │ (backup, 2s) │
├─────────────────────────┴───────────────────┤
│ SQLite (local retention) │
└─────────────────────────────────────────────┘