Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't create session in get_dag if not reading dags from database (ap…
…ache#38553) The function DagBag.get_dag has some logic to check if the serialized dag object should be refreshed. By accessing the dags dict directly we avoid that logic, and this is helpful for running a task exclusively with the internal API. Generally speaking this function "get_dag" is invoked when running the task command on a worker, and in that context we shouldn't need to handle expiration of the serdag. For the case where we're reading from db, I have left the original method call in place (which keeps the expiration logic in effect for that scenario). --------- Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
- Loading branch information