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
30ba31c8
Commit
30ba31c8
authored
Jan 31, 2017
by
BAIRE Anthony
Browse files
doc
parent
fab73f7e
Changes
1
Hide whitespace changes
Inline
Side-by-side
docker/controller.py
View file @
30ba31c8
...
@@ -295,11 +295,18 @@ class Manager:
...
@@ -295,11 +295,18 @@ class Manager:
return
(
yield
from
asyncio
.
get_event_loop
().
run_in_executor
(
self
.
_executor
,
*
k
))
return
(
yield
from
asyncio
.
get_event_loop
().
run_in_executor
(
self
.
_executor
,
*
k
))
# notes:
# - does not need to be reentrant
# - will be called a second time in a row if .process() is called during
# the execution of ._process()
def
_process
(
self
,
key
,
reset
):
def
_process
(
self
,
key
,
reset
):
"""Actual implementation of the job (to be reimplemented in inherited classes)
The Manager class guarantees that this function cannot be called
multiple times concurrently on the same key (in case the same key is
submitted multiple times, they Manager will call this function a second
time after it has terminated).
`reset` is a function that may be called to reset the 'dirty' state of
this key (this is to avoid calling ._process() a second time if not
necessary)
"""
raise
NotImplementedError
()
raise
NotImplementedError
()
@
asyncio
.
coroutine
@
asyncio
.
coroutine
...
...
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