Files
Heimdall/app
Josh Salway 243ad00810 Bound retry and unique-lock lifetimes on UpdateApps and ProcessApps
Both jobs implement ShouldBeUnique without a $uniqueFor value, which on
Redis and database drivers produces a lock that never expires. If the
worker is killed mid-fire (OOM, SIGKILL, server crash), the lock
persists and blocks all future dispatches of UpdateApps or ProcessApps
until the cache entry is manually cleared.

Neither job sets $tries, $backoff, or $timeout, so they inherit the
worker command's defaults (1 for queue:work, 0 for vapor:work), which
varies by platform and is brittle.

This change adds:
 - $uniqueFor = 3600   lock expires after 1 hour
 - $tries = 3          hard cap across worker restarts
 - $backoff = [30, 60, 120]  pace retries to reduce GitHub API load
 - $timeout = 60       bound per-attempt wall-clock time
 - failed(Throwable)    log permanent failures (and preserve the
                        existing Cache::lock('updateApps')->forceRelease
                        on UpdateApps)

A new test (tests/Feature/QueueSafetyTest.php) asserts the retry
properties are present.

All existing tests still pass.
2026-04-22 14:55:01 +10:00
..
2025-07-10 18:53:54 +00:00
2025-07-11 16:18:13 +01:00
2025-07-11 16:18:13 +01:00
2025-09-15 16:42:53 +01:00
2024-02-17 17:05:06 +00:00
2025-05-05 11:49:18 +02:00
2022-12-04 17:21:03 +00:00
2022-12-01 09:17:54 +00:00