Gregor Müllegger
10/02/2019, 8:18 AMemre
10/02/2019, 8:40 AMprint
, if you share that section of your logs.
2. I am not exactly familiar with building CLI tools, but using state = flow.run()
is probably the way to go. After the run()
, state
will be set to some state from prefect.engine.state
. Failed
for a failed run, Success
for a successful run, maybe some other states for edge cases. I think that is enough to infer an exit code from.Gregor Müllegger
10/02/2019, 9:04 AMif not state.is_successful():
sys.exit(1)
josh
10/02/2019, 1:31 PMsys.exit(0)
for successful and sys.exit(1)
for failure (taken off of the result from the flow run). I haven’t seen this use case before and would love to hear more about it!