Skip to content

Commit 350353d

Browse files
committed
fix(docker): worker healthcheck no longer depends on missing pgrep
The slim runtime image ships without procps, so the worker's `pgrep -f fourdpocket.workers.huey_worker` healthcheck always errored ("pgrep: executable file not found"), leaving a fully-functional worker permanently marked unhealthy. Replace it with a stdlib-python /proc scan.
1 parent 880a1c0 commit 350353d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

docker-compose.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ services:
6060
volumes:
6161
- 4dp-data:/data
6262
healthcheck:
63-
test: ["CMD", "pgrep", "-f", "fourdpocket.workers.huey_worker"]
63+
# The slim runtime image has no `pgrep` (no procps); use a stdlib-python
64+
# /proc scan so the worker isn't perpetually marked unhealthy.
65+
test: ["CMD", "python", "-c", "import os,sys; sys.exit(0 if any(b'huey_worker' in open('/proc/'+p+'/cmdline','rb').read() for p in os.listdir('/proc') if p.isdigit() and os.path.exists('/proc/'+p+'/cmdline')) else 1)"]
6466
interval: 30s
6567
timeout: 5s
6668
retries: 3

0 commit comments

Comments
 (0)