Repository navigation
Default WORKER_ENABLED to true when unset in compose env - #156
Merged
Merged
Conversation
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
There was a problem hiding this comment.
🟢 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_ENABLEDin Compose files via${WORKER_ENABLED:-true}default expansion - Expand
.env.templatenote 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #151, which merged before these Copilot review comments were addressed.
WORKER_ENABLED: $WORKER_ENABLEDsubstitutes an empty string (not the.env.template-documented default oftrue) 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 staytrueon only one instance in a scaled deployment (the heartbeat isn't safe to double-fire)🤖 Generated with Claude Code
Generated by Claude Code