- Change AsyncMQClient to connect to existing persistent queue by name
- Fix issue where DevOps Service created temporary anonymous queues instead of consuming from the correct named queue
- This allows consuming the 42 backlogged messages in freeleaps.devops.reconciler.output queue
- Change queue properties: exclusive=False, auto_delete=False, durable=True
- Resolves the core issue where messages were split between persistent and temporary queues
- Fix TypeError: object NoneType can't be used in 'await' expression
- FastAPI requires event handlers to be async functions
- This was blocking the entire application startup sequence
- Fixes the issue where message queue consumers were not starting properly
- Add RABBITMQ_OUTPUT_QUEUE_NAME environment variable support
- Fix hardcoded queue name 'reconciler.output' to use configurable queue name
- Default to 'freeleaps.devops.reconciler.output' if env var not set
- Add debug logging to show which queue name is being used
- This fixes the issue where 42 messages were stuck in the output queue due to queue name mismatch
Updated the TTL calculation in the DeploymentService to multiply by 3600 instead of 60, ensuring accurate time-to-live settings for deployments.
Signed-off-by: zhenyus <zhenyus@mathmast.com>
Changed the parameter name from deployment_project_id to deployment_product_id in the DevOpsReconcileRequest to ensure accurate referencing of the product associated with the deployment.
Signed-off-by: zhenyus <zhenyus@mathmast.com>
Updated the parameter name in the _start_deployment method to match the corrected constant in site_settings.py, ensuring consistency across the codebase.
Signed-off-by: zhenyus <zhenyus@mathmast.com>
Updated the DevOpsReconcileOperationType class to inherit from both str and Enum, enhancing its usability as a string enumeration in the application.
Signed-off-by: zhenyus <zhenyus@mathmast.com>
Updated the message consumer initialization to occur lazily during the startup event, improving application startup performance. Added detailed logging for service initialization, registration, and error handling to enhance traceability and robustness during startup and shutdown processes.
Signed-off-by: zhenyus <zhenyus@mathmast.com>
Updated comment to specify that the subscriber starts in the background, enhancing code readability and understanding of the asynchronous behavior.
Signed-off-by: zhenyus <zhenyus@mathmast.com>