Skip to content

Commit

Permalink
update smart sensor docs and minor fix on is_smart_sensor_compatible() (
Browse files Browse the repository at this point in the history
  • Loading branch information
okayhooni authored Mar 24, 2022
1 parent 4e24b22 commit e164932
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 2 additions & 3 deletions airflow/sensors/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,8 @@ def is_smart_sensor_compatible(self):
self.on_retry_callback,
self.on_failure_callback,
]
for status in check_list:
if status:
return False
if any(check_list):
return False

operator = self.__class__.__name__
return operator in self.sensors_support_sensor_service
Expand Down
2 changes: 2 additions & 0 deletions docs/apache-airflow/concepts/smart-sensors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ It is transparent to the individual users. Existing DAGs don't need to be change
enabling/disabling the smart sensor. Rotating centralized smart sensor tasks will not
cause any user’s sensor task failure.

* Using callback arguments (``on_success_callback``, ``on_failure_callback``, and ``on_retry_callback``) on a sensor task is not compatible with the smart sensor mode. If any callback arguments are provided, the sensor task will not be executed when the smart sensor mode is enabled.

Support new operators in the smart sensor service
-------------------------------------------------

Expand Down

0 comments on commit e164932

Please sign in to comment.