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



##########
File path: airflow/models/dagrun.py
##########
@@ -54,25 +54,27 @@ class DagRun(Base, LoggingMixin):
     _state = Column('state', String(50), default=State.RUNNING)
     run_id = Column(String(ID_LEN))
     external_trigger = Column(Boolean, default=True)
+    run_type = Column(String(50), nullable=True)
     conf = Column(PickleType)
 
     dag = None
 
     __table_args__ = (
-        Index('dag_id_state', dag_id, _state),
+        Index('dag_id_state_type', dag_id, _state, run_type),

Review comment:
       Maybe not using an `_and` but here:
   
   
https://github.com/apache/airflow/blob/738667082d32d3ef93ec2cd6c3735ff3691ba1cc/airflow/jobs/scheduler_job.py#L567-L575
   
   

##########
File path: airflow/models/dagrun.py
##########
@@ -54,25 +54,27 @@ class DagRun(Base, LoggingMixin):
     _state = Column('state', String(50), default=State.RUNNING)
     run_id = Column(String(ID_LEN))
     external_trigger = Column(Boolean, default=True)
+    run_type = Column(String(50), nullable=True)
     conf = Column(PickleType)
 
     dag = None
 
     __table_args__ = (
-        Index('dag_id_state', dag_id, _state),
+        Index('dag_id_state_type', dag_id, _state, run_type),

Review comment:
       Maybe not using an `and_` but here:
   
   
https://github.com/apache/airflow/blob/738667082d32d3ef93ec2cd6c3735ff3691ba1cc/airflow/jobs/scheduler_job.py#L567-L575
   
   




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

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


Reply via email to