This changes the API for conditions. Custom condition types need to be updated for this change.
A condition class which is polled (i.e. uses the check() method) should take PolledCondition as its base class. The check() method is now async.
A condition class which uses the run store (i.e. uses the check_runs() method) should take RunStoreCondition as its base class. Its check_runs() method should be rewritten as wait(run_store), which is async and should return only when the condition is complete (or a transition is induced). See Dependency.wait() for an example.
Resolves #272
This changes the API for conditions. Custom condition types need to be updated for this change.
A condition class which is polled (i.e. uses the
check()
method) should takePolledCondition
as its base class. Thecheck()
method is now async.A condition class which uses the run store (i.e. uses the
check_runs()
method) should takeRunStoreCondition
as its base class. Itscheck_runs()
method should be rewritten aswait(run_store)
, which is async and should return only when the condition is complete (or a transition is induced). SeeDependency.wait()
for an example.