Skip to content

Terminate subprocesses in celery after timeout #142

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: development
Choose a base branch
from

Conversation

aothms
Copy link
Collaborator

@aothms aothms commented Feb 1, 2025

First attempt combing two approaches:

  • I think as @rw-bsi suggested, use Popen and terminate when catching celery's injected soft timeout exception
  • but also a generic vacuum of any lingering process (not sure if necessary - it's what I started with)
  • we could also choose either one of the approaches I think

Tested with:

CELERY_TASK_SOFT_TIME_LIMIT = 4
CELERY_TASK_TIME_LIMIT = 6

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.

1 participant