gulshngill commented on a change in pull request #18968:
URL: https://github.com/apache/airflow/pull/18968#discussion_r735230939



##########
File path: airflow/models/dagrun.py
##########
@@ -334,6 +334,34 @@ def find(
 
         return qry.order_by(DR.execution_date).all()
 
+    @staticmethod
+    @provide_session
+    def find_duplicate(
+        dag_id: str,
+        run_id: str,
+        execution_date: datetime,
+        session: Session = None,
+    ) -> Optional['DagRun']:
+        """
+        Returns a dag run if there is an existing run for a dag at a specific 
run_id and execution_date.

Review comment:
       I think it's fine in `DagRun` since the function itself is related to 
finding DAG runs and has some similarities with `find` function
   
   Let me know your thoughts.




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