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/16 22:15:00 UTC

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

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



##########
File path: airflow/jobs/triggerer_job.py
##########
@@ -315,6 +339,7 @@ async def cleanup_finished_triggers(self):
                         details["name"],
                     )
                     self.failed_triggers.append(trigger_id)
+                self.completed_triggers.add(trigger_id)

Review comment:
       It appears that `completed_triggers` will grow in an unbounded fashion with this code over time - I would suggest a datastructure that is self-limiting. My initial idea is a dict with the IDs as keys and the datetime they were inserted as values, and then just remove all keys whose values are more than 5 minutes old in the first part of `purge_completed_triggers`.




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