You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "uranusjr (via GitHub)" <gi...@apache.org> on 2023/06/07 02:58:05 UTC

[GitHub] [airflow] uranusjr commented on a diff in pull request #31735: Replace State usages with strong-typed enums

uranusjr commented on code in PR #31735:
URL: https://github.com/apache/airflow/pull/31735#discussion_r1220748987


##########
airflow/cli/commands/jobs_command.py:
##########
@@ -32,7 +32,11 @@ def check(args, session: Session = NEW_SESSION) -> None:
     if args.hostname and args.local:
         raise SystemExit("You can't use --hostname and --local at the same time")
 
-    query = session.query(Job).filter(Job.state == State.RUNNING).order_by(Job.latest_heartbeat.desc())
+    query = (
+        session.query(Job)
+        .filter(Job.state == TaskInstanceState.RUNNING)

Review Comment:
   The value is mostly forwarded from TaskInstance, but I do wonder about the same. Maybe a new JobState makes sense?



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