peng преди 2 години
родител
ревизия
db8bae1392
променени са 1 файла, в които са добавени 17 реда и са изтрити 17 реда
  1. 17 17
      Controller/TestApi.py

+ 17 - 17
Controller/TestApi.py

@@ -123,8 +123,8 @@ class testView(View):
             return self.get_serial_details(request_dict, response, request)
         elif operation == 'find_device_serial':  # 查找设备序列号接口:306低功耗无Wi-Fi产品
             return self.find_device_serial(request_dict, response)
-        elif operation == 'funboost':  # funboost测试
-            return self.funboost_test(request_dict, response)
+        # elif operation == 'funboost':  # funboost测试
+        #     return self.funboost_test(request_dict, response)
         else:
             return response.json(414)
 
@@ -905,18 +905,18 @@ class testView(View):
             password = make_password(password)
         return response.json(0)
 
-    @staticmethod
-    @boost("task_queue_name1", qps=0.5, broker_kind=BrokerEnum.REDIS_ACK_ABLE)  # 入参包括20种,运行控制方式非常多,想得到的控制都会有。
-    def task_fun(x, y):
-        print(f'{x} + {y} = {x + y}')
-        return True
-
-
-    def funboost_test(self, request_dict, response):
-        # self.task_fun.push(x=5, y=6)
-        self.task_fun.clear()
-        funboost_aps_scheduler.start()
-        funboost_aps_scheduler.add_push_job(self.task_fun, 'interval', id='3_second_job', seconds=60,
-                                            kwargs={"x": 5, "y": 6})  # 每隔3秒发布一次任务,自然就能每隔3秒消费一次任务了。
-        self.task_fun.consume()
-        return response.json(0)
+    # @staticmethod
+    # @boost("task_queue_name1", qps=0.5, broker_kind=BrokerEnum.REDIS_ACK_ABLE)  # 入参包括20种,运行控制方式非常多,想得到的控制都会有。
+    # def task_fun(x, y):
+    #     print(f'{x} + {y} = {x + y}')
+    #     return True
+    #
+    #
+    # def funboost_test(self, request_dict, response):
+    #     # self.task_fun.push(x=5, y=6)
+    #     self.task_fun.clear()
+    #     funboost_aps_scheduler.start()
+    #     funboost_aps_scheduler.add_push_job(self.task_fun, 'interval', id='3_second_job', seconds=60,
+    #                                         kwargs={"x": 5, "y": 6})  # 每隔3秒发布一次任务,自然就能每隔3秒消费一次任务了。
+    #     self.task_fun.consume()
+    #     return response.json(0)