Эх сурвалжийг харах

修复创建一次性任务时间问题

locky 1 жил өмнө
parent
commit
81f163ce07

+ 2 - 1
Controller/SensorGateway/SmartSceneController.py

@@ -1324,7 +1324,8 @@ class SmartSceneView(View):
         if repeat == 0:
             time_stamp = condition['time_dict']['time_stamp'] + delay_time
             name += str(time_stamp)
-            celery_beat_obj.creat_clocked_task(name=name, task=task, time_stamp=time_stamp, args=args)
+            celery_beat_obj.creat_clocked_task(
+                name=name, task=task, time_stamp=time_stamp, timezone_offset=tz, args=args)
         # 周期任务
         else:
             hour, minute, second, is_next_day = cls.handle_delay_time(minutes, delay_time)