potiuk commented on code in PR #30255:
URL: https://github.com/apache/airflow/pull/30255#discussion_r1148352066
##########
airflow/cli/commands/standalone_command.py:
##########
@@ -235,13 +236,13 @@ def port_open(self, port):
return False
return True
- def job_running(self, job):
+ def job_running(self, job_runner_class: type[BaseJobRunner]):
"""
Checks if the given job name is running and heartbeating correctly.
Used to tell if scheduler is alive.
"""
- recent = job.most_recent_job()
+ recent = job_runner_class.most_recent_job()
Review Comment:
OK. I changed the approach here:
* moved it back to BaseJob (but also moved it outside of the class)
* I am passing now BaseJobRunner type as parameter to determine the job type
* the status of scheduler/triggerer is now displayed via lazy-proxied lambda
performing the query with the right parameter - rather than lazy-proxied method
of the Job-derived object.
Looks like it works nicely and is more logical.
--
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]