|
@@ -1,6 +1,7 @@
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
|
from abc import abstractmethod
|
|
|
+import time
|
|
|
from typing import Dict, Tuple, Optional
|
|
|
|
|
|
import arrow
|
|
@@ -292,6 +293,7 @@ class Co2TargetController(TargetController):
|
|
|
|
|
|
@logger.catch()
|
|
|
async def readjust_all_target(project_id: str, space_id: str, wechat_time: str):
|
|
|
+ start = time.perf_counter()
|
|
|
async with AsyncClient() as client:
|
|
|
transfer = TransferService(client, project_id, space_id)
|
|
|
platform = DataPlatformService(client, project_id, space_id)
|
|
@@ -313,6 +315,7 @@ async def readjust_all_target(project_id: str, space_id: str, wechat_time: str):
|
|
|
previous_changes = await transfer.env_database_get()
|
|
|
temperature_changes = previous_changes.get('temperature')
|
|
|
logger.debug(f'temperature previous changes: {nl}{temperature_changes}')
|
|
|
+ logger.debug(f'request web service elapsed: {time.perf_counter() - start}')
|
|
|
|
|
|
if feedback.get('switch off') and feedback.get('switch off') > 0:
|
|
|
need_switch_off = True
|