Commit 478053b
committed
refactor: address reviewer feedback on subscription.py
- Split subscribe_message_bindings into focused helper functions
- Add module-level constants for delivery modes and status codes
- Use WorkflowStatus enum instead of magic strings
- Add proper validation for dead_letter_topics (ValueError if multiple)
- Fix _resolve_event_loop to properly raise on missing loop
- Add zombie thread detection (raise RuntimeError on timeout)
- Move json import to top level
- Rename variables for clarity:
- grouped -> bindings_by_topic_key
- b -> binding
- plan -> binding_schema_pairs
- preferred -> matching_ce_type_pairs
- Replace logger.info with logger.debug for internal operations
- Restore underscore prefixes for internal functions
- Remove nested try/except where possible
- Add proper docstrings explaining function purposes
Signed-off-by: Arush Wadhawan <warush23+github@gmail.com>1 parent 4d2fcf1 commit 478053b
File tree
2 files changed
+454
-263
lines changed- dapr_agents/workflow/utils
2 files changed
+454
-263
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
195 | | - | |
| 195 | + | |
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
| |||
0 commit comments