kaxil commented on a change in pull request #21495:
URL: https://github.com/apache/airflow/pull/21495#discussion_r806179717



##########
File path: airflow/sensors/smart_sensor.py
##########
@@ -341,21 +340,21 @@ def _load_sensor_works(self, session=None):
                 .filter(SI.state == State.SENSING)
                 .filter(SI.shardcode < self.shard_max, SI.shardcode >= 
self.shard_min)
             )
-            tis = query.all()
+            sis = query.all()
 
-        self.log.info("Performance query %s tis, time: %.3f", len(tis), 
timer.duration)
+        self.log.info("Performance query %s sis, time: %.3f", len(sis), 
timer.duration)
 
         # Query without checking dagrun state might keep some failed dag_run 
tasks alive.
         # Join with DagRun table will be very slow based on the number of 
sensor tasks we
         # need to handle. We query all smart tasks in this operator
         # and expect scheduler correct the states in 
_change_state_for_tis_without_dagrun()
 
         sensor_works = []
-        for ti in tis:
+        for si in sis:
             try:
-                sensor_works.append(SensorWork(ti))
+                sensor_works.append(SensorWork(si))
             except Exception:
-                self.log.exception("Exception at creating sensor work for ti 
%s", ti.key)
+                self.log.exception("Exception at creating sensor work for ti 
%s", si.ti_key)

Review comment:
       (I couldn't find `si.key` too)




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to