mjpieters commented on a change in pull request #10632:
URL: https://github.com/apache/airflow/pull/10632#discussion_r479633824



##########
File path: airflow/models/taskinstance.py
##########
@@ -1184,7 +1184,7 @@ def signal_handler(signum, frame):  # pylint: 
disable=unused-argument
         task_copy.post_execute(context=context, result=result)
 
         end_time = time.time()
-        duration = end_time - start_time
+        duration = timedelta(seconds=end_time - start_time)

Review comment:
       No, `time.time()` is a float value representing seconds, see the 
[documentation](https://docs.python.org/3/library/time.html#time.time). So 
`duration` is the difference, in seconds, between start and end time.




----------------------------------------------------------------
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:
[email protected]


Reply via email to