You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
« Previous
Version 3
Next »
import ecflow
# Create the client. This will read the default environment variables
ci = ecflow.Client();
ci.set_host_port("localhost", "4141")
try:
# Get the node tree suite definition as stored in the server
# The definition is retrieved and stored on the variable 'ci'
ci.sync_local()
# access the definition retrieved from the server
defs = ci.get_defs()
if defs == None :
print "The server has no defintion "
exit(1)
# create a vector to hold all the tasks in the definition
task_vec = ecflow.TaskVec();
defs.get_all_tasks(task_vec);
# iterate over tasks and print path and state
for task in task_vec:
print task.get_abs_node_path() + " " + str(task.get_state())
except RuntimeError, e:
print "failed: " + str(e);