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 2019/11/29 02:08:54 UTC

[GitHub] [airflow] XD-DENG commented on a change in pull request #6682: [AIRFLOW-6088] pass DAG processing runtime as duration to stats

XD-DENG commented on a change in pull request #6682: [AIRFLOW-6088] pass DAG processing runtime as duration to stats
URL: https://github.com/apache/airflow/pull/6682#discussion_r351957610
 
 

 ##########
 File path: airflow/models/dagbag.py
 ##########
 @@ -419,8 +419,6 @@ def collect_dags(
                 dag_id_names = str(dag_ids)
 
                 td = timezone.utcnow() - ts
-                td = td.total_seconds() + (
-                    float(td.microseconds) / 1000000)
 
 Review comment:
   One of the error I found in the CI log is below
   
   ```
   1) ERROR: test_cli_list_dags (tests.cli.commands.test_dag_command.TestCliDags)
   ----------------------------------------------------------------------
      Traceback (most recent call last):
       tests/cli/commands/test_dag_command.py line 361 in test_cli_list_dags
         dag_command.dag_list_dags(args)
       airflow/utils/cli.py line 80 in wrapper
         return f(*args, **kwargs)
       airflow/cli/commands/dag_command.py line 231 in dag_list_dags
         print(dagbag.dagbag_report())
       airflow/models/dagbag.py line 480 in dagbag_report
         duration=sum([o.duration for o in stats]),
      TypeError: unsupported operand type(s) for +: 'int' and 'datetime.timedelta'
   ```
   
   It should be due to this change in ` airflow/models/dagbag.py`
   

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


With regards,
Apache Git Services