inject W2P_TASK in current, so you can use current.W2P_TASK in imported modules. Thanks @Xiaonuo for the feature request
This commit is contained in:
@@ -229,6 +229,9 @@ def executor(queue, task, out):
|
|||||||
"name '%s' not found in scheduler's environment" % f)
|
"name '%s' not found in scheduler's environment" % f)
|
||||||
#Inject W2P_TASK into environment
|
#Inject W2P_TASK into environment
|
||||||
_env.update({'W2P_TASK' : W2P_TASK})
|
_env.update({'W2P_TASK' : W2P_TASK})
|
||||||
|
#Inject W2P_TASK into current
|
||||||
|
from gluon import current
|
||||||
|
current.W2P_TASK = W2P_TASK
|
||||||
globals().update(_env)
|
globals().update(_env)
|
||||||
args = loads(task.args)
|
args = loads(task.args)
|
||||||
vars = loads(task.vars, object_hook=_decode_dict)
|
vars = loads(task.vars, object_hook=_decode_dict)
|
||||||
|
|||||||
Reference in New Issue
Block a user