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 2021/11/13 02:43:57 UTC

[GitHub] [airflow] dstandish commented on a change in pull request #19546: Track completed triggers until deleted from database

dstandish commented on a change in pull request #19546:
URL: https://github.com/apache/airflow/pull/19546#discussion_r748671412



##########
File path: airflow/jobs/triggerer_job.py
##########
@@ -148,6 +149,25 @@ def load_triggers(self):
         ids = Trigger.ids_for_triggerer(self.id)
         self.runner.update_triggers(set(ids))
 
+    @provide_session
+    def purge_completed_triggers_list(self, session):

Review comment:
       it would be nice if we didn't have to query tthe database here but i don't think it can be avoided.
   
   i explored updating `clean_unused` to return the `ids` deleted.  then we could pass those to `purge_completed` and purge those rows.  but this won't work because `clean_unused` does not filter w.r.t. triggerer_id, so other triggerer instances could delete the rows belonging to _this_ triggerer, so `completed_triggers` would grow over time.




-- 
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