-
Notifications
You must be signed in to change notification settings - Fork 1
/
AuthServer.py
47 lines (33 loc) · 941 Bytes
/
AuthServer.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# -*- coding: utf-8 -*-
__author__ = 'xiliangma'
import sys
reload(sys)
sys.setdefaultencoding( "utf-8")
from backend.restapi.API import app
from backend.utils.LogManager import Log
from backend.utils.PPDServiceManager import JpypeManager
logManager = Log()
log = logManager.getLogger("AuthServer")
jpypeManager = JpypeManager()
"""
1. build PPD Client environment
"""
status = jpypeManager.checPPDClient()
if status == 0 :
log.info("Check PPD Client run environment success.")
else:
log.error("Check PPD Client run environment failed.")
"""
2. init JpypeManager
"""
log.info("Start Jpype jvm...")
jpypeManager.startJPype()
# """
# 3. init PPDServiceManager
# """
# log.info("Start PPD Client...")
# ppdService = PPDClientManager()
# oTool = ppdService.loginPPDClient()
if __name__ == "__main__":
log.info("Start AuthServer...")
app.run(port=8081, host='0.0.0.0', debug=False, ssl_context='adhoc')