Core: refactoring contexts with more logical responsibilities, stopping to rely on kargs ordering for compat with python3.5

This commit is contained in:
Romain Dorgueil
2017-11-12 14:22:29 +01:00
parent 739a64d8f4
commit c87775f090
17 changed files with 325 additions and 252 deletions

View File

@ -52,15 +52,8 @@ class ExecutorStrategy(Strategy):
def starter(node):
@functools.wraps(node)
def _runner():
try:
with node:
node.loop()
except:
logging.getLogger(__name__).critical(
'Uncaught exception in node execution for {}.'.format(node), exc_info=True
)
node.shutdown()
node.stop()
with node:
node.loop()
try:
futures.append(executor.submit(_runner))