feat: Add Celery task queue for event-driven test processing#982
Open
feat: Add Celery task queue for event-driven test processing#982
Conversation
Replace cron-based polling with an optional Celery task queue system for faster, more reliable test execution. This architectural improvement enables event-driven processing, parallel test execution, and better retry handling. New files: - celery_app.py: Celery application factory with Flask context - mod_ci/tasks.py: Task definitions (start_test, cleanup, pending check) - install/celery-worker.service: Systemd service for Celery worker - install/celery-beat.service: Systemd service for Celery beat scheduler - tests/test_ci/test_tasks.py: Unit tests for Celery functionality Modified files: - requirements.txt: Added celery[redis] and redis packages - config_sample.py: Added Celery configuration options - mod_ci/controllers.py: Added trigger_test_tasks(), updated add_test_entry() - install/installation.md: Added Celery setup documentation Key features: - USE_CELERY_TASKS feature flag for gradual migration (default: False) - Parallel mode: cron continues as fallback during transition - Three task queues: default, test_execution, maintenance - Periodic tasks via Celery Beat for cleanup and pending test discovery - Graceful degradation if Celery unavailable 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove unused 'shared_task' import from celery - Fix import ordering to satisfy isort checks 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Note: This is a clean re-submission of #963, which was merged and then reverted because it included unrelated commits. This PR contains only the Celery-related changes.
Test plan
🤖 Generated with Claude Code