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
don't kill the server if some modules are still running #109
don't kill the server if some modules are still running #109
Conversation
Build failed. ❌ ansible-test-sanity-docker-devel FAILURE in 8m 21s (non-voting) |
50426e4
to
2f5072e
Compare
Build failed. ❌ ansible-test-sanity-docker-devel FAILURE in 9m 37s (non-voting) |
recheck |
This change depends on a change that failed to merge. |
regate |
This change depends on a change that failed to merge. |
2f5072e
to
9dd824a
Compare
Ensure we don't have any ongoing task before we shutdown the server. The syndrome was errors like this: UnexpectedFailure: Cannot decode plugin answer: b''\n" Closes: ansible-collections/vmware.vmware_rest#336
9dd824a
to
62f3cad
Compare
Build succeeded. ✔️ ansible-test-sanity-docker-devel SUCCESS in 8m 14s (non-voting) |
self.jobs_started = 0 | ||
self.jobs_done = 0 |
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 feel like you could simplify this by just having a self.task_running
boolean variable.
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.
We can have several tasks running in parallel.
|
||
async def handle(self, reader, writer): | ||
self._watcher.cancel() | ||
|
||
self.jobs_started += 1 | ||
raw_data = await reader.read() | ||
if not raw_data: | ||
return |
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.
Isn't this potentially going to lead to the server process never being killed?
Build succeeded (gate pipeline). ✔️ ansible-test-sanity-docker-devel SUCCESS in 7m 43s (non-voting) |
turbo: ensure we clean up the leaked jobs See: #109 (comment) Reviewed-by: Mike Graves <mgraves@redhat.com>
Depends-On: #110
Ensure we don't have any ongoing task before we shutdown the server.
The syndrome was errors like this:
Closes: ansible-collections/vmware.vmware_rest#336