Commit 4d409cd1 authored by wanliofficial's avatar wanliofficial

更新一些配置参数以及一些打印调试语句

parent d16639cc
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -55,7 +55,7 @@ class DevelopConfig(object):
EPK_DIR = "D:\\projects\\scriptiot\\evm_app_store_files\\epks"
UPLOAD_ROOT_DIR = "D:\\projects\\scriptiot\\evm_app_store_files"
UPLOAD_ALLOWED = set(['doc', 'docs', 'csv', 'xls', 'xlsx'])
BIND = '127.0.0.1:3000'
BIND = '0.0.0.0:3001'
WORKERS = 2
WORKER_CONNECTIONS = 1000
BACKLOG = 64
......
......@@ -2,6 +2,7 @@
# -*- coding: utf_8 -*-
import json
import pprint
from datetime import datetime
from flask_jwt_extended import (create_access_token,)
from application.app import db
......@@ -72,6 +73,7 @@ class LoginResource(object):
'name': user.username,
'token': create_access_token(identity={'uuid': str(user.uuid), 'name': user.username}),
}
pprint.pprint(result)
return result, ResponseCode.HTTP_SUCCESS
def put(self, uuid, params, jwt={}):
......
......@@ -59,7 +59,7 @@ def debug():
(r"/ws/v1/notify", NotifyHandler),
(r'.*', FallbackHandler, dict(fallback=wsgi_app))
], **{ 'debug': True, })
application.listen(3000, address='127.0.0.1', xheaders=True)
application.listen(3001, address='127.0.0.1', xheaders=True)
# 主进程退出信号
signal.signal(signal.SIGINT, raise_graceful_exit)
......
......@@ -57,7 +57,10 @@ class LoginResourceList(Resource):
data = postLoginSchema.load(json_payload)
# 更新data,插入ip信息,如果没有转发ip,那么则获取请求ip
data.update({ "ip": request.headers.get('X-Forwarded-For', request.remote_addr), "user_agent": request.headers.get('User-Agent', "") })
print("###############=======================>", data)
logger.info(data)
result, message = signalManager.actionPostLogin.emit(data)
print(">>>>>>>>>>>", result)
return response_result(message, data=result)
except ValidationError as e:
return response_result(ResponseCode.HTTP_INVAILD_REQUEST, data=e.messages)
......@@ -67,6 +70,7 @@ class LoginResourceList(Resource):
if hasattr(e, 'args'):
data = e.args
current_app.logger.error(e)
traceback.print_exc()
return response_result(ResponseCode.HTTP_SERVER_ERROR, data=data)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment