You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/01/05 09:22:20 UTC

[GitHub] [airflow] kaxil commented on a change in pull request #20657: Clarify variable names and use cleaner set diff syntax

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



##########
File path: airflow/jobs/triggerer_job.py
##########
@@ -382,8 +382,8 @@ def update_triggers(self, requested_trigger_ids: Set[int]):
         # handling.
         current_trigger_ids = set(self.triggers.keys())
         # Work out the two difference sets
-        new_trigger_ids = requested_trigger_ids.difference(current_trigger_ids)
-        old_trigger_ids = current_trigger_ids.difference(requested_trigger_ids)
+        new_trigger_ids = requested_trigger_ids - current_trigger_ids
+        remove_trigger_ids = current_trigger_ids - requested_trigger_ids

Review comment:
       ```suggestion
           trigger_ids_to_remove = current_trigger_ids - requested_trigger_ids
   ```
   
   nit -- no strong preference




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org