mik-laj commented on a change in pull request #4298: [AIRFLOW-3478] Make sure 
that the session is closed
URL: https://github.com/apache/incubator-airflow/pull/4298#discussion_r240831704
 
 

 ##########
 File path: airflow/bin/cli.py
 ##########
 @@ -456,14 +448,12 @@ def _run(args, dag, ti):
         if args.ship_dag:
             try:
                 # Running remotely, so pickling the DAG
-                session = settings.Session()
-                pickle = DagPickle(dag)
-                session.add(pickle)
-                session.commit()
-                pickle_id = pickle.id
-                # TODO: This should be written to a log
-                print('Pickled dag {dag} as pickle_id:{pickle_id}'
 
 Review comment:
   Such formatting of messages causes that a string object is created, which 
then may not be used anywhere, when the login level will be too low.
   Formatting parameters should be passed as arguments to the `info` method.
   Example:
   
   ````python
   self.log.info("The Table '%s' does not exists already.", self.table_id)
   ````

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to