project: fix keyboard interruption for scripts #994
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We often run
poetry run server
. And we stop it withCtrl+C
. Thisgenerally gives a keyboard interruption signal that stops the processus.
But this is broken: the processus is already runned!
This commit fixes the issue by sending again the interruption signal to
the runned script.
Co-Authored-by: Olivier DOSSMANN [email protected]
Why are you opening this PR?
The
poetry run server
often let invenio server and celery worker running (after Ctrl+C keyboard interruption). When we launch it again: it returns an error about "Port already addressed".This PR changes the behaviour by sending an interruption signal to launched script when using a keyboard interruption command.
How to test?
poetry run server
ps aux|grep invenio
should not return any launched processps aux |grep celery
should do the same (except if you have other invenio instances launched)Code review check list