From b677636730c91c52cc59fe52ebdf30aa27ec4b2f Mon Sep 17 00:00:00 2001 From: Brett Edwards Date: Tue, 5 Nov 2024 13:30:30 -0800 Subject: [PATCH] calc time --- api/app/jobs/sfms_calculations.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/api/app/jobs/sfms_calculations.py b/api/app/jobs/sfms_calculations.py index 2030a6c73..4820a2ff0 100644 --- a/api/app/jobs/sfms_calculations.py +++ b/api/app/jobs/sfms_calculations.py @@ -22,13 +22,15 @@ class SFMSCalcJob: async def calculate_bui(self, start_time: datetime): logger.info(f"Begin BUI raster calculations -- calculating {DAYS_TO_CALCULATE} days forward") + start_exec = get_utc_now() + bui_processor = BUIDateRangeProcessor(start_time, DAYS_TO_CALCULATE, RasterKeyAddresser()) async with S3Client() as s3_client: await bui_processor.process_bui(s3_client, multi_wps_dataset_context, multi_wps_dataset_context) # calculate the execution time. - execution_time = get_utc_now() - start_time + execution_time = get_utc_now() - start_exec hours, remainder = divmod(execution_time.seconds, 3600) minutes, seconds = divmod(remainder, 60)