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:
niphlod
2013-10-23 00:03:04 +02:00
parent fba11869b6
commit d30098d646
+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)