fix: make workflow worker batch size configurable#196
Conversation
WalkthroughConfiguration externalization: A hardcoded batch size value (5) in the workflow job is replaced with a dynamic configuration parameter. The batch_size option is added to config.ini and read at runtime from main.py, allowing environment-based customization without code changes. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
wavefront/server/background_jobs/workflow_job/workflow_job/main.py (1)
106-106: LGTM! Change follows existing configuration patterns.The dynamic batch size configuration is implemented consistently with the
thread_countpattern (line 109) and replaces the hardcoded value with a configurable option.Optional: Consider adding validation for positive batch size values.
StreamListener.__init__acceptsstreaming_batch_sizewithout validation. Adding a check like:if batch_size <= 0: raise ValueError(f"batch_size must be positive, got {batch_size}")would prevent edge cases from propagating to
event_manager.receive_messages().
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
wavefront/server/background_jobs/workflow_job/workflow_job/config.ini(1 hunks)wavefront/server/background_jobs/workflow_job/workflow_job/main.py(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: build-push-artifact
🔇 Additional comments (1)
wavefront/server/background_jobs/workflow_job/workflow_job/config.ini (1)
5-5: LGTM! Configuration follows established patterns.The new
batch_sizeconfiguration option follows the same pattern as other config values (e.g.,thread_count), using environment variable substitution with a sensible default of 5.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.