瀏覽代碼

关闭限速测试服测试

yf_fyh 3 年之前
父節點
當前提交
a46639a2b9
共有 3 個文件被更改,包括 21 次插入20 次删除
  1. 2 2
      apps/Equipment/views.py
  2. 1 1
      bigdataAPI.ini
  3. 18 17
      bigdataAPI/settings.py

+ 2 - 2
apps/Equipment/views.py

@@ -27,7 +27,7 @@ class SearchEquip(APIView):
 
 class QxzDeviceListView(APIView):
     authentication_classes = [APIAuthentication]
-    throttle_classes = [QxzDeviceListRateThrottle]
+    # throttle_classes = [QxzDeviceListRateThrottle]
 
     def get(self, request, *args, **kwargs):
         """获取气象站设备列表接口"""
@@ -66,7 +66,7 @@ class QxzDeviceListView(APIView):
 class QxzDeviceDetailView(APIView):
     authentication_classes = [APIAuthentication]
     permission_classes = [QXZDeviceDetailPermission]
-    throttle_classes = [QxzDeviceDetailRateThrottle]
+    # throttle_classes = [QxzDeviceDetailRateThrottle]
     
     def get(self, request, *args, **kwargs):
         serializer = QxzDeviceDetailSerializer(data=request.query_params)

+ 1 - 1
bigdataAPI.ini

@@ -12,7 +12,7 @@ module=bigdataAPI.wsgi:application
 master=true
 # 进程个数
 processes=2
-threads=2
+threads=4
 # sock的文件
 socket=/data/pycharm/bigdataAPI/bigdataAPI.sock
 #;socket=172.30.0.16:8000

+ 18 - 17
bigdataAPI/settings.py

@@ -79,34 +79,34 @@ WSGI_APPLICATION = 'bigdataAPI.wsgi.application'
 # https://docs.djangoproject.com/en/2.1/ref/settings/#databases
 
 
-# USER_CONFIG = {
-#     'mysql': {
-#         'host': 'localhost',
-#         'user': 'root',
-#         'pwd': 'yfkj@6020',
-#         'port': 3306
-#     },
-#     'mongodb': {
-#         'host': 'localhost',
-#         'user': 'root',
-#         'pwd': 'yfkj@6020',
-#         'port': 27017
-#     }
-# }
 USER_CONFIG = {
     'mysql': {
         'host': 'localhost',
         'user': 'root',
         'pwd': 'yfkj@6020',
-        'port': 61882
+        'port': 3306
     },
     'mongodb': {
         'host': 'localhost',
         'user': 'root',
         'pwd': 'yfkj@6020',
-        'port': 57017
+        'port': 27017
     }
 }
+# USER_CONFIG = {
+#     'mysql': {
+#         'host': 'localhost',
+#         'user': 'root',
+#         'pwd': 'yfkj@6020',
+#         'port': 61882
+#     },
+#     'mongodb': {
+#         'host': 'localhost',
+#         'user': 'root',
+#         'pwd': 'yfkj@6020',
+#         'port': 57017
+#     }
+# }
 
 
 DATABASES = {
@@ -116,7 +116,8 @@ DATABASES = {
         'USER': 'api',
         'PASSWORD': 'yfkj@6020',
         'HOST': '127.0.0.1',
-        'PORT': 61882,
+        # 'PORT': 61882,
+        'PORT': 3306,
         'OPTIONS': {'charset': 'utf8mb4'}
     }
 }