BashSensor¶
Use the BashSensor
to use arbitrary command for sensing. The command
should return 0 when it succeeds, any other value otherwise.
t3 = BashSensor(task_id="Sensor_succeeds", bash_command="exit 0")
t4 = BashSensor(task_id="Sensor_fails_after_3_seconds", timeout=3, soft_fail=True, bash_command="exit 1")