瀏覽代碼

优化定时任务

peng 1 年之前
父節點
當前提交
bedaac1663
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Controller/SensorGateway/SmartSwitchController.py

+ 1 - 1
Controller/SensorGateway/SmartSwitchController.py

@@ -370,7 +370,7 @@ class SmartSwitchView(View):
         redis_obj.CONN.expire(task_id + 'do_notify', 60)
         if not is_lock:
             return
-        result = CommonService.req_publish_mqtt_msg(serial_number, topic_name, msg)
+        result = CommonService.req_publish_mqtt_msg(serial_number, topic_name, msg, qos=0)
         LOGGER.info('定时发送mqtt结果:{},参数:{},{},{},{},{},线程:{},进程:{}'.format(result, serial_number, topic_name, msg,
                                                                          now_time, task_id,
                                                                          threading.get_ident(), os.getpid()))