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

ota使用独立域名;修改正式服日志配置

locky 9 сар өмнө
parent
commit
bec197d163

+ 1 - 0
Ansjer/cn_config/config_formal.py

@@ -31,6 +31,7 @@ PUSH_REDIS_ADDRESS = 'redis-8e21f0aa-d62d-4306-8a6d-6dad4e99dde4.cn-east-3.dcs.m
 DOMAIN_HOST = 'www.zositechc.cn'
 SERVER_DOMAIN = 'https://www.zositechc.cn/'
 SERVER_DOMAIN_SSL = 'https://www.zositechc.cn/'
+SERVER_DOMAIN_OTA = 'http://ota.zositechc.cn/'
 NGINX_RTMP_STAT = 'http://www.zositechc.cn/stat'
 DETECT_PUSH_DOMAIN = 'http://push.zositechc.cn/'
 DETECT_PUSH_DOMAINS = 'https://push.zositechc.cn/'

+ 1 - 0
Ansjer/cn_config/config_test.py

@@ -36,6 +36,7 @@ PUSH_REDIS_ADDRESS = '127.0.0.1'
 DOMAIN_HOST = 'test.zositechc.cn'
 SERVER_DOMAIN = 'http://test.zositechc.cn/'
 SERVER_DOMAIN_SSL = 'https://test.zositechc.cn/'
+SERVER_DOMAIN_OTA = 'http://test.ota.zositechc.cn/'
 NGINX_RTMP_STAT = 'http://test.zositechc.cn/stat/'
 DETECT_PUSH_DOMAIN = 'http://test.push.dvema.com/'
 DETECT_PUSH_DOMAINS = 'https://test.push.dvema.com/'

+ 6 - 6
Ansjer/cn_config/formal_settings.py

@@ -238,8 +238,8 @@ LOGGING = {
             'level': 'INFO',
             'class': 'logging.handlers.RotatingFileHandler',
             'filename': BASE_DIR + '/static/log/info/info.log',
-            'backupCount': 10,
-            'maxBytes': 1024 * 1024 * 2 * 1024,  # 2G
+            'backupCount': 5,
+            'maxBytes': 1024 * 1024 * 5 * 1024,  # 5G
             'formatter': 'standard',
             'encoding': 'utf-8',
         },
@@ -247,8 +247,8 @@ LOGGING = {
             'level': 'INFO',
             'class': 'logging.handlers.RotatingFileHandler',
             'filename': BASE_DIR + '/static/log/error_code/error_code.log',
-            'backupCount': 10,
-            'maxBytes': 1024 * 1024 * 2 * 1024,  # 2G
+            'backupCount': 3,
+            'maxBytes': 1024 * 1024 * 20 * 1024,  # 20G
             'formatter': 'standard',
             'encoding': 'utf-8',
         },
@@ -256,8 +256,8 @@ LOGGING = {
             'level': 'INFO',
             'class': 'logging.handlers.RotatingFileHandler',
             'filename': BASE_DIR + '/static/log/success_code/success_code.log',
-            'backupCount': 10,
-            'maxBytes': 1024 * 1024 * 2 * 1024,  # 2G
+            'backupCount': 3,
+            'maxBytes': 1024 * 1024 * 2 * 1024,  # 20G
             'formatter': 'standard',
             'encoding': 'utf-8',
         },

+ 1 - 0
Ansjer/eur_config/config_formal.py

@@ -31,6 +31,7 @@ PUSH_REDIS_ADDRESS = '10.80.1.16'
 DOMAIN_HOST = 'www.zositeche.com'
 SERVER_DOMAIN = 'http://www.zositeche.com/'
 SERVER_DOMAIN_SSL = 'https://www.zositeche.com/'
+SERVER_DOMAIN_OTA = 'http://ota.zositeche.com/'
 NGINX_RTMP_STAT = 'http://www.zositeche.com/stat'
 DETECT_PUSH_DOMAIN = 'http://push.zositeche.com/'
 DETECT_PUSH_DOMAINS = 'https://push.zositeche.com/'

+ 5 - 5
Ansjer/eur_config/formal_settings.py

@@ -236,8 +236,8 @@ LOGGING = {
             'level': 'INFO',
             'class': 'logging.handlers.RotatingFileHandler',
             'filename': BASE_DIR + '/static/log/info/info.log',
-            'backupCount': 10,
-            'maxBytes': 1024 * 1024 * 2 * 1024,  # 2G
+            'backupCount': 3,
+            'maxBytes': 1024 * 1024 * 5 * 1024,  # 5G
             'formatter': 'standard',
             'encoding': 'utf-8',
         },
@@ -245,8 +245,8 @@ LOGGING = {
             'level': 'INFO',
             'class': 'logging.handlers.RotatingFileHandler',
             'filename': BASE_DIR + '/static/log/error_code/error_code.log',
-            'backupCount': 10,
-            'maxBytes': 1024 * 1024 * 2 * 1024,  # 2G
+            'backupCount': 3,
+            'maxBytes': 1024 * 1024 * 20 * 1024,  # 20G
             'formatter': 'standard',
             'encoding': 'utf-8',
         },
@@ -272,7 +272,7 @@ LOGGING = {
             'level': 'INFO',
             'class': 'logging.handlers.RotatingFileHandler',
             'filename': BASE_DIR + '/static/log/apple_pay/apple_pay.log',
-            'backupCount': 3,
+            'backupCount': 10,
             'maxBytes': 1024 * 1024 * 2 * 1024,  # 2G
             'formatter': 'standard',
             'encoding': 'utf-8',

+ 1 - 0
Ansjer/us_config/config_formal.py

@@ -31,6 +31,7 @@ PUSH_REDIS_ADDRESS = '10.60.0.215'
 DOMAIN_HOST = 'www.dvema.com'
 SERVER_DOMAIN = 'http://www.dvema.com/'
 SERVER_DOMAIN_SSL = 'https://www.dvema.com/'
+SERVER_DOMAIN_OTA = 'http://ota.dvema.com/'
 NGINX_RTMP_STAT = 'http://www.dvema.com/stat'
 DETECT_PUSH_DOMAIN = 'http://push.dvema.com/'
 DETECT_PUSH_DOMAINS = 'https://push.dvema.com/'

+ 6 - 6
Ansjer/us_config/formal_settings.py

@@ -238,8 +238,8 @@ LOGGING = {
             'level': 'INFO',
             'class': 'logging.handlers.RotatingFileHandler',
             'filename': BASE_DIR + '/static/log/info/info.log',
-            'backupCount': 10,
-            'maxBytes': 1024 * 1024 * 2 * 1024,  # 2G
+            'backupCount': 5,
+            'maxBytes': 1024 * 1024 * 5 * 1024,  # 5G
             'formatter': 'standard',
             'encoding': 'utf-8',
         },
@@ -247,8 +247,8 @@ LOGGING = {
             'level': 'INFO',
             'class': 'logging.handlers.RotatingFileHandler',
             'filename': BASE_DIR + '/static/log/error_code/error_code.log',
-            'backupCount': 10,
-            'maxBytes': 1024 * 1024 * 2 * 1024,  # 2G
+            'backupCount': 3,
+            'maxBytes': 1024 * 1024 * 20 * 1024,  # 20G
             'formatter': 'standard',
             'encoding': 'utf-8',
         },
@@ -256,8 +256,8 @@ LOGGING = {
             'level': 'INFO',
             'class': 'logging.handlers.RotatingFileHandler',
             'filename': BASE_DIR + '/static/log/success_code/success_code.log',
-            'backupCount': 10,
-            'maxBytes': 1024 * 1024 * 2 * 1024,  # 2G
+            'backupCount': 3,
+            'maxBytes': 1024 * 1024 * 20 * 1024,  # 20G
             'formatter': 'standard',
             'encoding': 'utf-8',
         },

+ 5 - 7
Controller/OTAEquipment.py

@@ -13,7 +13,7 @@ from django.views.decorators.csrf import csrf_exempt
 from django.views.generic import TemplateView
 
 from Ansjer.config import BASE_DIR
-from Ansjer.config import SERVER_DOMAIN
+from Ansjer.config import SERVER_DOMAIN, SERVER_DOMAIN_OTA
 from Model.models import Device_User, EquipmentVersionLimitModel, CountryIPModel, DeviceOTAUpgradeRecord, LogModel
 from Model.models import Equipment_Version
 from Object.RedisObject import RedisObject
@@ -181,10 +181,10 @@ def getUpdataFileUrlInterface(request):
     if file_path:
         if file_path.find('static/Upgrade/') != -1:
             path = file_path.replace('static/Upgrade/', '').replace('\\', '/')
-            url = SERVER_DOMAIN + 'OTA/downloads/' + path + '?time=' + str(time.time())
+            url = SERVER_DOMAIN_OTA + 'OTA/downloads/' + path + '?time=' + str(time.time())
             urls.append(url)
         if file_path.find('static/otapack') != -1:
-            url = SERVER_DOMAIN + 'OTA/downloadsPack/' + file_path + '?time=' + str(time.time())
+            url = SERVER_DOMAIN_OTA + 'OTA/downloadsPack/' + file_path + '?time=' + str(time.time())
             urls.append(url)
     if len(urls) > 0:
         res = {
@@ -784,9 +784,7 @@ def getDownLoadOTApackUrl(request):
     file_path = equipmentVersion[0].filePath
     if file_path:
         if file_path.find('static/otapack') != -1:  # 只下载otapack路径下的文件
-            url = SERVER_DOMAIN + 'OTA/downloadsPack/' + file_path  # 复用app下载ota包的方式
-            # SERVER_DOMAIN = 'https://test.dvema.com/'
-            # url = SERVER_DOMAIN + 'OTA/downloadsPack/' + file_path
+            url = SERVER_DOMAIN_OTA + 'OTA/downloadsPack/' + file_path  # 复用app下载ota包的方式
             res = {
                 "url": url,
             }
@@ -826,7 +824,7 @@ def checkMaxVersion(request):
     if now_version >= softwareVersion:
         # 当前版本大于等于最新版本,不需要更新
         return response.json(902)
-    url = SERVER_DOMAIN + 'OTA/downloadsPack/' + filePath  # 复用app下载ota包的方式
+    url = SERVER_DOMAIN_OTA + 'OTA/downloadsPack/' + filePath  # 复用app下载ota包的方式
     res = {
         'url': url,
     }