The purpose of a meter is to signal proportional completion of a task and to be able to trigger another job which that is waiting for this proportional completion. Let us say that the task "model" creates a hundred files, and there are ten other tasks to process these files. Task "t0" processes files 0-9, task "t1" files 10-19, and so on. The python API would look something like:
Code Block |
---|
|
suite = Suite("x") |
...
f = suite.add_family("f") |
...
task_model = f.add_task("model") |
...
task_model.add_meter("file",0,100,100) |
...
...
...
...
...
t.add_trigger("model:file ge " + str(file)) |