Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
allgo
allgo
Commits
c4479d1d
Commit
c4479d1d
authored
Nov 16, 2017
by
BAIRE Anthony
Browse files
fix unshielded futures
parent
7b91c3e5
Changes
2
Hide whitespace changes
Inline
Side-by-side
controller/controller.py
View file @
c4479d1d
...
...
@@ -1119,7 +1119,7 @@ class JobManager(Manager):
try
:
# graceful kill
kill
(
sig
)
yield
from
asyncio
.
wait_for
(
wait_task
,
timeout
=
5
)
yield
from
asyncio
.
wait_for
(
asyncio
.
shield
(
wait_task
)
,
timeout
=
5
)
except
asyncio
.
TimeoutError
:
# hard kill (after 5 seconds)
kill
(
signal
.
SIGKILL
)
...
...
controller/shared_swarm.py
View file @
c4479d1d
...
...
@@ -346,7 +346,7 @@ class _SlaveResourceManager(_ResourceManager):
@
asyncio
.
coroutine
def
wait_slot
(
self
,
name
):
task
=
self
.
_tasks
[
name
]
return
(
yield
from
task
.
__future
)
return
(
yield
from
asyncio
.
shield
(
task
.
__future
)
)
def
container_created
(
self
,
cid
,
name
):
pass
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment