Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
allgo
allgo
Commits
56945d3e
Commit
56945d3e
authored
Feb 02, 2017
by
BAIRE Anthony
Browse files
add shutdown case
parent
cc7f6057
Changes
1
Hide whitespace changes
Inline
Side-by-side
docker/controller.py
View file @
56945d3e
...
...
@@ -809,11 +809,13 @@ class DockerWatcher:
limiter
=
rate_limit
(
60
)
log
.
debug
(
"watcher started"
)
while
not
self
.
_shutdown
:
while
not
self
.
_shutdown
:
# pragma: nobranch
next
(
limiter
)
try
:
for
event
in
self
.
_client
.
events
(
filters
=
{
"event"
:
"die"
}):
log
.
debug
(
"event %r"
,
event
)
if
self
.
_shutdown
:
return
log
.
debug
(
"docker event %r"
,
event
)
self
.
_loop
.
call_soon_threadsafe
(
self
.
_event
,
event
)
except
Exception
:
log
.
exception
(
"docker watcher exception"
)
...
...
@@ -836,7 +838,7 @@ class DockerWatcher:
if
not
self
.
_shutdown
:
self
.
_shutdown
=
True
for
fut
in
self
.
_futures
.
values
():
if
not
fut
.
done
():
if
not
fut
.
done
():
# pragma: nobranch
fut
.
set_exception
(
ShuttingDown
())
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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