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


##########
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:
   There you go. 
   
   I removed the AIP-44 code now. Rebasing and removing it from #30376 now.



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