jedcunningham commented on code in PR #30308:
URL: https://github.com/apache/airflow/pull/30308#discussion_r1163138831


##########
airflow/jobs/job.py:
##########
@@ -292,3 +265,181 @@ def most_recent_job(job_type: str, session: Session = 
NEW_SESSION) -> Job | None
         )
         .first()
     )
+
+
+@provide_session
+def run_job(job: Job | JobPydantic, session: Session = NEW_SESSION) -> int | 
None:
+    """
+    Runs the job. The Job is always an ORM object and setting the state is 
happening within the
+    same DB session and the session is kept open throughout the whole execution
+
+    :meta private:
+
+    TODO: Maybe we should not keep the session during job execution ?.
+    """
+    if _ENABLE_AIP_44:
+        return _run_job_for_AIP_44(job=job, session=session)

Review Comment:
   More concretely, what I mean is instead of adding these separate run, 
prepare, and complete functions, keep it simple and just have this block fetch 
the db job and follow the normal path for now. When we are ready to not use the 
db, we can review the structure then.



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