From 3f8d457da46e34ab6d24718b13fed19297b6f6cb Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 23 Aug 2026 19:02:39 +0000 Subject: [PATCH] Wire WORKER_ENABLED into docker-compose env Schedule.nextRunAt/lastRunAt and the job worker's poll both no-op unless WORKER_ENABLED=true is set on the server process (JobWorkerService.isEnabled()) - it wasn't passed through in either compose file, so schedules (e.g. attendance-cleanup-sweep) never ran regardless of the schedules table row being correctly configured. - .env.template: default WORKER_ENABLED=true - docker-compose.yml / docker-compose-swarm.yml: pass it to the server service's environment Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_011dEYULADLgGNfZ4nv6gz8s --- .env.template | 4 ++++ docker-compose-swarm.yml | 1 + docker-compose.yml | 1 + 3 files changed, 6 insertions(+) diff --git a/.env.template b/.env.template index 9688169c..15bc0dd0 100644 --- a/.env.template +++ b/.env.template @@ -12,3 +12,7 @@ SMTP_PASSWORD=password # Maintenance Mode (Server-side, auto-detected by frontend) MAINTENANCE_MODE=false MAINTENANCE_MESSAGE=המערכת בתחזוקה תכנונית. אנא נסו שוב מאוחר יותר. + +# Enables the background job worker + schedule heartbeat (recurring jobs like +# attendance-cleanup-sweep) on this server instance. +WORKER_ENABLED=true diff --git a/docker-compose-swarm.yml b/docker-compose-swarm.yml index 32fd9981..e57f02e9 100644 --- a/docker-compose-swarm.yml +++ b/docker-compose-swarm.yml @@ -96,6 +96,7 @@ services: SMTP_PASSWORD: $SMTP_PASSWORD MAINTENANCE_MODE: $MAINTENANCE_MODE MAINTENANCE_MESSAGE: $MAINTENANCE_MESSAGE + WORKER_ENABLED: $WORKER_ENABLED # ports: # - '30004:3000' networks: diff --git a/docker-compose.yml b/docker-compose.yml index 4b4e82a0..12ab48d2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -63,6 +63,7 @@ services: SMTP_PASSWORD: $SMTP_PASSWORD MAINTENANCE_MODE: $MAINTENANCE_MODE MAINTENANCE_MESSAGE: $MAINTENANCE_MESSAGE + WORKER_ENABLED: $WORKER_ENABLED depends_on: - database labels: