Runs php artisan queue:work as a systemd --user service (Restart=always, hourly recycling) so OSINT lookups process automatically instead of requiring a manually-run queue:work. All 8 planned phases now done. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
1.2 KiB
1.2 KiB
Queue worker (systemd --user)
QUEUE_CONNECTION=database, so OSINT lookups only actually run while a
queue:work process is alive. This unit supervises one as a systemd --user
service — no root/sudo needed, survives crashes (Restart=always), and
restarts hourly (--max-time=3600) to pick up code/config changes and avoid
long-lived-process memory growth.
--timeout=180 is intentionally above config('osint.run_timeout') (120s,
in config/osint.php) — the worker's timeout must exceed a runner's own
timeout, or the worker kills the job before the runner gets a chance to.
Install
cp deploy/systemd/osint-queue-worker.service ~/.config/systemd/user/
systemctl --user daemon-reload
systemctl --user enable --now osint-queue-worker.service
Requires lingering enabled so the service keeps running without an active
login session: loginctl enable-linger $USER (needs sudo once, or ask your
sysadmin — already enabled on this box).
Operate
systemctl --user status osint-queue-worker.service
journalctl --user -u osint-queue-worker.service -f
systemctl --user restart osint-queue-worker.service # after deploying code/.env changes