def executingTask(parentListener, taskname, arguments): executor = XPSExecutor.getNonsparkExecutor() larguments = List(arguments) requestId = log_outgoing_request(None, "executingTask", (parentListener, taskname, larguments)) listener = executor.executingTask(parentListener, taskname, toXPS(larguments)) log_incoming_result(requestId, "result", listener) return listener
def startExecuteTask(agent, listener, taskname, arguments): if not isinstance(listener, ExecutionListener): listener = None newlistener = _SparkExecutionListener(agent, listener) debug("creating listener %s with parent %s", newlistener, listener) executor = XPSExecutor.getNonsparkExecutor() if executor == None: raise LowError("XPSExecutor nonsparkExecutor is not set") larguments = List(arguments) log_outgoing_request(newlistener, "executeTask", (newlistener, taskname, larguments)) executor.executeTask(newlistener, taskname, toXPS(larguments)) return newlistener
def callTaskSucceeded(listener, bindings): larguments = List(bindings) log_outgoing_result(listener, "success", larguments) listener.taskSucceeded(toXPS(larguments))