Skip to content

Default WORKER_ENABLED to true when unset in compose env - #156

Merged
buzz-code merged 1 commit into
mainfrom
claude/worker-enabled-default-fallback
Aug 23, 2026
Merged

buzz-code merged 1 commit into
mainfrom
claude/worker-enabled-default-fallback

Conversation

@buzz-code

Copy link
Copy Markdown
Owner

Summary

Follow-up to #151, which merged before these Copilot review comments were addressed. WORKER_ENABLED: $WORKER_ENABLED substitutes an empty string (not the .env.template-documented default of true) when the var is missing from the actual deployed .env — silently disabling the worker/heartbeat instead of defaulting on.

  • docker-compose.yml / docker-compose-swarm.yml — use Compose default interpolation: ${WORKER_ENABLED:-true}
  • .env.template — clarify that this must stay true on only one instance in a scaled deployment (the heartbeat isn't safe to double-fire)

🤖 Generated with Claude Code


Generated by Claude Code

Follow-up to #151, which merged before these Copilot review comments
were addressed: 'WORKER_ENABLED: $WORKER_ENABLED' substitutes an
empty string (not the .env.template-documented default of true) when
the var is missing from the actual deployed .env - silently disabling
the worker/heartbeat. Use Compose's default interpolation instead, and
clarify in .env.template that this must stay true on only one instance
in a scaled deployment.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011dEYULADLgGNfZ4nv6gz8s
Copilot AI lite review requested due to automatic review settings August 23, 2026 19:42

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

Change small, correct, low-risk; fixes documented default behavior for worker enablement in Compose.

Pull request overview

Fix Compose env interpolation so WORKER_ENABLED defaults to true when unset, preventing silent disable of job worker + schedule heartbeat in deployed envs.

Changes:

  • Set WORKER_ENABLED in Compose files via ${WORKER_ENABLED:-true} default expansion
  • Expand .env.template note about single-replica/one-worker requirement to avoid double heartbeat
File summaries
File Description
docker-compose.yml Default WORKER_ENABLED to true when env var missing/empty
docker-compose-swarm.yml Same defaulting behavior for swarm deployment
.env.template Clarify worker enablement rules for scaled replicas
Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@buzz-code
buzz-code merged commit e61595e into main Aug 23, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants