soft_fail (bool) – Set to true to mark the task as SKIPPED on failure
poke_interval (float) – Time in seconds that the job should wait in between each tries
timeout (float) – Time, in seconds before the task times out and fails.
mode (str) – How the sensor operates. Options are: { poke | reschedule }, default is poke. When set to poke the sensor is taking up a worker slot for its whole execution time and sleeps between pokes. Use this mode if the expected runtime of the sensor is short or if a short poke interval is required. Note that the sensor will hold onto a worker slot and a pool slot for the duration of the sensor’s runtime in this mode. When set to reschedule the sensor task frees the worker slot when the criteria is not yet met and it’s rescheduled at a later time. Use this mode if the time before the criteria is met is expected to be quite long. The poke interval should be more than one minute to prevent too much load on the scheduler.
exponential_backoff (bool) – allow progressive longer waits between pokes by using exponential backoff algorithm
在运行下游任务之前,您可以使用googleprovider包中的GCSObjectExistenceSensor来验证文件是否存在
您可以查看官方示例here。请记住,此传感器从
BaseSensorOperator
扩展,因此您可以定义参数,如poke_interval
、timeout
和mode
,以满足您的需要source
相关问题 更多 >
编程相关推荐