From 065b81e07c117087d37078deb4a3474640f8251e Mon Sep 17 00:00:00 2001 From: Tom Webber Date: Tue, 23 Jul 2024 12:02:43 +0100 Subject: [PATCH] fix: import error --- ingestion/utils.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ingestion/utils.py b/ingestion/utils.py index de8fcf5..7a4fb4e 100644 --- a/ingestion/utils.py +++ b/ingestion/utils.py @@ -1,5 +1,5 @@ import logging -from time import strftime, time +import time def st_time(func): @@ -8,13 +8,13 @@ def st_time(func): """ def st_func(*args, **keyArgs): - t1 = time() + t1 = time.time() r = func(*args, **keyArgs) - t2 = time() + t2 = time.time() logging.info( f"Function={func.__name__}, args={args}, " - f"start_time={strftime('%Y-%m-%d %H:%M:%S', time.gmtime(t1))}, " - f"end_time={strftime('%Y-%m-%d %H:%M:%S', time.gmtime(t2))}" + f"start_time={time.strftime('%Y-%m-%d %H:%M:%S', time.gmtime(t1))}, " + f"end_time={time.strftime('%Y-%m-%d %H:%M:%S', time.gmtime(t2))}" ) logging.info(f"Function={func.__name__}, args={args}, total_time={t2 - t1}") return r