Commit 9143489
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 51999e5 commit 9143489
1 file changed
+452
-261
lines changed
0 commit comments