The execute_complete method is the callback for a deferred Airflow task. After a trigger detects success, Airflow returns execution to a worker, which runs this method before the scheduler marks the task successful. section 9.5.2
A deferrable sensor connects the callback to the rest of the task lifecycle:
- The callback performs the remaining completion work; a timeout raises an exception and fails the task. section 9.5.2
MovieLens ratings sensor
A custom sensor defers to MovielensTrigger while waiting for ratings, then execute_complete logs "Movie Ratings are Available!". A downstream fetch_ratings task can proceed after the sensor succeeds.
