potiuk commented on code in PR #30255:
URL: https://github.com/apache/airflow/pull/30255#discussion_r1148672363
##########
airflow/cli/commands/scheduler_command.py:
##########
@@ -46,10 +47,12 @@ def scheduler(args):
"""Starts Airflow Scheduler."""
print(settings.HEADER)
- job = SchedulerJob(
- subdir=process_subdir(args.subdir),
- num_runs=args.num_runs,
- do_pickle=args.do_pickle,
+ job = BaseJob(
Review Comment:
ANd maybe more comment here. I probably misunderstood the question. If you
look at the further changes it gets there. Eventually BaseJob will not have any
methods - step-by-step I am extracting them to regular functions in base_job
where they take BaseJob/Pydantic.
Moving them to runner is a little problematic, I thin runner should not
manage state of the job, generally speaking. Runners should just read job's
properties - because this is currently where the job properties are stored and
we won't change it. I would prefer to keep the "state change" and "query"
method in the base_job.py (but as pure python functions rather than job
methods. We could move them to runner later on but I would prefer to make
minimum set of changes now (also to make review easier) rather than change it
fundamentally. Smaller, incremental changes are easier to verify at each step
simplty.
But if we think as next step making thosse functions part of the Base Runner
- why not, let's see how it might work (but again - next step I think).
--
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]