Merge pull request #276 from niphlod/enhancement/scheduler_current

inject W2P_TASK in current, so you can use current.W2P_TASK in imported ...
This commit is contained in:
mdipierro
2013-10-23 17:43:36 -07:00
+3
View File
@@ -229,6 +229,9 @@ def executor(queue, task, out):
"name '%s' not found in scheduler's environment" % f)
#Inject W2P_TASK into environment
_env.update({'W2P_TASK' : W2P_TASK})
#Inject W2P_TASK into current
from gluon import current
current.W2P_TASK = W2P_TASK
globals().update(_env)
args = loads(task.args)
vars = loads(task.vars, object_hook=_decode_dict)