Skip to content
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

[PULP-218] Add timeout to immediate tasks #6155

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pedro-psb
Copy link
Member

No description provided.

@pedro-psb pedro-psb changed the title Add timeout to immediate tasks [PULP-218] Add timeout to immediate tasks Dec 16, 2024
Comment on lines +62 to +63
signal.signal(signal.SIGALRM, timeout_handler)
signal.alarm(IMMEDIATE_TASK_TIMEOUT)
Copy link
Member

Choose a reason for hiding this comment

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

Oh, interesting.
This is quite close to low level process handling. I wonder if this might interfere with other uses of the signal handler.

Do you think we can instead require that all immediate tasks are async functions? We could then implement the timeout on the asyncio level with much more confidence.

Copy link
Member Author

Choose a reason for hiding this comment

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

Do you think we can instead require that all immediate tasks are async functions? We could then implement the timeout on the asyncio level with much more confidence.

Yes. I dont have a good idea of how much friction this imposes, but that's definitely more safe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants