You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/05/17 12:43:31 UTC

[GitHub] [airflow] vikramcse commented on a change in pull request #15890: commiting dagPickle session when the airflow tasks run --ship-dag --interactive command

vikramcse commented on a change in pull request #15890:
URL: https://github.com/apache/airflow/pull/15890#discussion_r633496375



##########
File path: airflow/cli/commands/task_command.py
##########
@@ -80,6 +80,7 @@ def _run_task_by_executor(args, dag, ti):
             with create_session() as session:
                 pickle = DagPickle(dag)
                 session.add(pickle)
+                session.commit()
                 pickle_id = pickle.id
                 # TODO: This should be written to a log
                 print(f'Pickled dag {dag} as pickle_id: {pickle_id}')

Review comment:
       @ashb Ahh! Thanks for your inputs! I made the changes as per your suggestions.
   
   earlier I was referring to below code
   https://github.com/apache/airflow/blob/3711a29e5e253ede4ab12efe5990e83240e8a9a9/airflow/jobs/backfill_job.py#L782-L785 
     




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org