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 2022/04/07 20:23:00 UTC

[GitHub] [airflow] houqp commented on a diff in pull request #22793: Support DAGRun type reset through the backfill command

houqp commented on code in PR #22793:
URL: https://github.com/apache/airflow/pull/22793#discussion_r845532544


##########
airflow/models/dagrun.py:
##########
@@ -217,6 +217,12 @@ def set_state(self, state: DagRunState):
             if state == State.QUEUED:
                 self.queued_at = timezone.utcnow()
 
+    @provide_session
+    def reset_run_type(self, session: Session = None):
+        self.run_type = DagRunType.SCHEDULED
+        self.run_id = self.run_id.replace(DagRunType.BACKFILL_JOB.value, DagRunType.SCHEDULED.value)

Review Comment:
   good call, removed the line.



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