Browse Source

恢复正式服部署

yf_fyh 3 năm trước cách đây
mục cha
commit
42679cccdf
4 tập tin đã thay đổi với 22 bổ sung22 xóa
  1. 2 2
      apps/Equipment/views.py
  2. 2 2
      bigdataAPI.ini
  3. 18 18
      bigdataAPI/settings.py
  4. BIN
      requirements.txt

+ 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)

+ 2 - 2
bigdataAPI.ini

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

+ 18 - 18
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,8 +116,8 @@ DATABASES = {
         'USER': 'api',
         'PASSWORD': 'yfkj@6020',
         'HOST': '127.0.0.1',
-        # 'PORT': 61882,
-        'PORT': 3306,
+        'PORT': 61882,
+        # 'PORT': 3306,
         'OPTIONS': {'charset': 'utf8mb4'}
     }
 }

BIN
requirements.txt