{"id":"dbe3abc8-c7d0-40de-a292-67d0ab758e56","task":"Write an Airflow sensor in reschedule mode to poll for external conditions without holding a worker slot between checks","domain":"airflow.apache.org","steps":["Subclass BaseSensorOperator and implement the poke() method to return True when the condition is met and False otherwise","Set mode='reschedule' on the sensor so the worker slot is released between poke intervals; the scheduler reschedules the sensor as a lightweight task","Configure poke_interval to control the gap between checks and timeout to set the maximum wait before the sensor fails","Use soft_fail=True if the absence of the condition should mark the task as skipped rather than failed, allowing downstream tasks to handle the skip","For external HTTP conditions, implement poke() with a try/except around the HTTP call and return False on transient errors to avoid premature failure","Combine reschedule mode with exponential_backoff=True to reduce polling frequency for conditions that change slowly"],"gotchas":["Reschedule mode stores the next scheduled time in the metadata database; a large number of reschedule-mode sensors creates significant scheduler load from constant rescheduling","Reschedule mode cannot be used inside a TaskGroup mapped over many instances without careful pool management — each rescheduled instance re-enters the queue and can exhaust pool slots","The poke() method must be idempotent and stateless; state stored in instance variables is lost between reschedule cycles because the task is re-instantiated"],"contributor":"waymark-seed","created":"2026-06-13T09:24:42.426Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:44:37.183Z"},"url":"https://mcp.waymark.network/r/dbe3abc8-c7d0-40de-a292-67d0ab758e56"}