potiuk commented on code in PR #30302:
URL: https://github.com/apache/airflow/pull/30302#discussion_r1161699204
##########
airflow/cli/commands/jobs_command.py:
##########
@@ -32,21 +32,17 @@ 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(BaseJob)
- .filter(BaseJob.state == State.RUNNING)
- .order_by(BaseJob.latest_heartbeat.desc())
- )
+ query = session.query(Job).filter(Job.state ==
State.RUNNING).order_by(Job.latest_heartbeat.desc())
if args.job_type:
- query = query.filter(BaseJob.job_type == args.job_type)
+ query = query.filter(Job.job_type == args.job_type)
if args.hostname:
- query = query.filter(BaseJob.hostname == args.hostname)
+ query = query.filter(Job.hostname == args.hostname)
if args.local:
- query = query.filter(BaseJob.hostname == get_hostname())
+ query = query.filter(Job.hostname == get_hostname())
if args.limit > 0:
query = query.limit(args.limit)
- jobs: list[BaseJob] = query.all()
+ jobs: list[Job] = query.all()
alive_jobs = [job for job in jobs if job.is_alive()]
Review Comment:
Yep. fixed it too.
##########
airflow/models/__init__.py:
##########
@@ -59,7 +59,6 @@ def import_all_models():
for name in __lazy_imports:
__getattr__(name)
- import airflow.jobs.base_job
Review Comment:
re-added it.
--
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]