-
Notifications
You must be signed in to change notification settings - Fork 684
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
Feature/make play stop wait for java process to finish #1239
Feature/make play stop wait for java process to finish #1239
Conversation
The error is due to failing tests. All failing tests are reporting the same error, but it seems very unlikely to be related to the code changes in the PR. Can someone confirm whether this is a CI issue and not related to the PR's code?
|
The failed tests in question,
|
@LouisJackman I have restarted the build. Yes, probably it's just a flaky tests. Let's see. UPD. You see, it was a flaky tests. :) |
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.
@xael-fry Seems to be OK. Can be merged.
@xael-fry Well, I have merged this PR. @LouisJackman Thank you! |
* Only pay for message construction on 'real' errors * Wait for process termination before leaving Play process
…ava-process-to-finish [#1239] make play stop wait for java process to finish
play stop
finishes before the Java process forked from the Python script has finished running. It will now wait until the Java process finishes before finishing itself.This strikes me as the least surprising behaviour. We have a systemd service that restarts our application by running
play stop
andplay start
. However, this means the two can end up running side-by-side for a while, which can obviously lead to various problems.This PR also fixes the issue of Ctrl-C not stopping
play run
properly. SIGINT was previously only trapped after the main process was interrupted, which isn't useful as far as I can see. Ctrl-C now prints "Terminating Java" and waits until Java has finished.The changes were tested with Python 2.7 on Ubuntu Linux 18.04. If an earlier Python must be used and tested against, let me know and I'll update the PR. Thanks.