siddharthvp commented on issue #17861:
URL: https://github.com/apache/airflow/issues/17861#issuecomment-907398091
I was taking a shot at this, but am unsure how it can be implemented
*correctly*. We could have a function like:
```py
@provide_session
def _check_if_dupe(self, dag, session=None):
other_dag = session.query(SerializedDagModel).filter(
SerializedDagModel.dag_id == dag.dag_id,
SerializedDagModel.fileloc != dag.fileloc
).first()
return other_dag is not None
```
but this would give a false-positive alert if a DAG was moved from file A to
file B and by chance events occur in this sequence:
process A -> DAG moved to B -> process B
--
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]