ashb commented on a change in pull request #16401:
URL: https://github.com/apache/airflow/pull/16401#discussion_r662349972



##########
File path: airflow/models/dagrun.py
##########
@@ -126,6 +130,10 @@ def __init__(
     ):
         self.dag_id = dag_id
         self.run_id = run_id
+        if queued_at is self.__NO_VALUE:
+            self.queued_at = timezone.utcnow() if state == State.QUEUED else 
None
+        else:
+            self.queued_at = queued_at

Review comment:
       We need to do this after `self.state = state` (current L141), and `def 
set_state` should also set queued_at when state is being _changed_ to queued.
   




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