Context
Upon revisiting the project after some time, I've noticed the Celery task setup and usage may not be functioning as intended. The implementation was originally done while I was still learning Celery, and likely requires a careful review and refactor.
Recent review of the codebase (including the monitor_transactions task and related async helpers) suggests the following improvements and areas needing attention:
- Ensure that Celery is properly configured and started with the correct broker and backend.
- Confirm that async functions are being invoked and awaited correctly within Celery tasks (since Celery tasks are sync by default).
- Audit the use of
nest_asyncio—consider if it's still needed or if code can be restructured to avoid it.
- Check for error handling and session management in async DB operations to prevent resource leaks.
Tasks
- Review all Celery task definitions and their usage patterns
- Ensure tasks are defined and called according to best practices
- Verify proper error handling and task result retrieval
- Update documentation as needed
- Add or update automated tests for Celery task logic, mocking external services as needed
- Address any issues with async task patterns, DB session management, or external API calls
Context
Upon revisiting the project after some time, I've noticed the Celery task setup and usage may not be functioning as intended. The implementation was originally done while I was still learning Celery, and likely requires a careful review and refactor.
Recent review of the codebase (including the monitor_transactions task and related async helpers) suggests the following improvements and areas needing attention:
nest_asyncio—consider if it's still needed or if code can be restructured to avoid it.Tasks