فهرست منبع

fix a bug that won't switch off normally

chenhaiyang 4 سال پیش
والد
کامیت
ae60fd632c
1فایلهای تغییر یافته به همراه1 افزوده شده و 2 حذف شده
  1. 1 2
      app/controllers/targets.py

+ 1 - 2
app/controllers/targets.py

@@ -301,7 +301,6 @@ async def readjust_all_target(project_id: str, space_id: str, wechat_time: str):
         previous_changes = await transfer.env_database_get()
 
     if feedback.get('switch off') and feedback.get('switch off') > 0:
-        logger.info('need switch off')
         need_switch_off = True
         for item in SWITCH_RELATED_FEEDBACK:
             if feedback.get(item) and feedback.get(item) > 0:
@@ -312,11 +311,11 @@ async def readjust_all_target(project_id: str, space_id: str, wechat_time: str):
 
     need_run_room_control = False
     if need_switch_off:
+        need_run_room_control = True
         async with AsyncClient() as client:
             transfer = SpaceInfoService(client, project_id, space_id)
             await transfer.set_temporary_custom()
 
-        logger.info('need run room control')
         return need_run_room_control
 
     temperature_results = {}