-
-
Notifications
You must be signed in to change notification settings - Fork 57
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: worker hangs sometimes #162
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually good suggestions. Can you implement these?
I would implement it using multiprocessing Queue. Since we know how many workers we would like to have, so we can just wait for n messages from this queue, where n is the number of worker processes.
Codecov Report
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. @@ Coverage Diff @@
## develop #162 +/- ##
===========================================
+ Coverage 67.62% 70.06% +2.44%
===========================================
Files 37 42 +5
Lines 942 1313 +371
===========================================
+ Hits 637 920 +283
- Misses 305 393 +88
... and 1 file with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
OK, I did it through |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's great. Thank you.
issues: #63 #81
child process inherits signal handlers from parent
the problem is that the
terminate
signal was triggered before the signal handler of the child process was set, we must set it immediately after the process startsand I suggest telling the parent process that the worker is ready before the parent continues with the event queue.
or at least wait a while for the worker process to set the signal handler
or we can handle it in parent signal handler, and raise an error if it is not a main process