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

fix: SIGINT worker processes when process_manager starts #362

Merged
merged 1 commit into from
Sep 6, 2024

Conversation

sminnee
Copy link
Contributor

@sminnee sminnee commented Sep 4, 2024

Without this change, I found that workers could get stuck on a long-running task. Worker processes are sent a SIGINT, and then that signal is handled appropriately to exit the prefetcher & runner.

Is this appropriate as general purpose behaviour, and if not, would it make sense as a command-line option?

Without this change, I found that workers could get stuck on a long-running task.
Worker processes are sent a SIGINT, and then that signal is handled appropriately to exit the prefetcher &
runner
@sminnee
Copy link
Contributor Author

sminnee commented Sep 4, 2024

I note that tasks cancelled in this way have their result returned as error = KeyboardInterrupt.

In my own application, I have a middleware that re-kicks these tasks when the worker next starts.

Copy link
Member

@s3rius s3rius left a comment

Choose a reason for hiding this comment

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

Makes sense to me. Thanks for the contribution. Will be released soon.

@s3rius s3rius merged commit b8b06ab into taskiq-python:master Sep 6, 2024
23 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