Skip to content

Implement a Retry Mechanism for Celery Tasks#680

Merged
vincent-olivert-riera merged 2 commits intoline:masterfrom
hoangpn:feature/celery_task_retryable_on_timeout
Jan 15, 2026
Merged

Implement a Retry Mechanism for Celery Tasks#680
vincent-olivert-riera merged 2 commits intoline:masterfrom
hoangpn:feature/celery_task_retryable_on_timeout

Conversation

@hoangpn
Copy link
Contributor

@hoangpn hoangpn commented Dec 3, 2025

We've introduced a base class for Celery tasks to incorporate a retry mechanism after reaching a processing time limit. This enhancement helps prevent Promgen's workers from slow processing or getting indefinitely stuck when handling time-consuming tasks.
An implementation of dead-letter queue has been also added.

@hoangpn hoangpn force-pushed the feature/celery_task_retryable_on_timeout branch 5 times, most recently from 6e7d7cd to ba27931 Compare December 9, 2025 09:47
@hoangpn hoangpn force-pushed the feature/celery_task_retryable_on_timeout branch 3 times, most recently from 6175489 to 37b6af9 Compare December 15, 2025 03:19
@hoangpn hoangpn force-pushed the feature/celery_task_retryable_on_timeout branch from 37b6af9 to 11376d3 Compare December 18, 2025 08:07
Copy link
Contributor

@vincent-olivert-riera vincent-olivert-riera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hoangpn , can you rebase this branch on master?

We've introduced a base class for Celery tasks to incorporate a retry mechanism after reaching
a processing time limit. This enhancement helps prevent Promgen's workers from slow processing
or getting indefinitely stuck when handling time-consuming tasks.
We have implemented a dead-letter queue for Celery retried tasks. Retried tasks will be routed
to a queue named "promgen_dlq" by setting CELERY_ENABLE_PROMGEN_DEAD_LETTER_QUEUE to True.
By default, this feature is disabled.
@hoangpn hoangpn force-pushed the feature/celery_task_retryable_on_timeout branch from 11376d3 to b107b17 Compare January 15, 2026 04:07
@hoangpn
Copy link
Contributor Author

hoangpn commented Jan 15, 2026

@vincent-olivert-riera
Thank you so much! The PR is ready for the final review. 🙇

@vincent-olivert-riera vincent-olivert-riera merged commit 4711145 into line:master Jan 15, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants