Commit 21efdc90 authored by 广宏伟's avatar 广宏伟

Merged in test (pull request #17)

Test
parents dd8e5568 1a691f79
......@@ -29,7 +29,8 @@ logger = get_logger(__file__)
class Coco:
config_class = Config
default_config = {
'NAME': socket.gethostname(),
'DEFAULT_NAME': socket.gethostname(),
'NAME': None,
'CORE_HOST': 'http://127.0.0.1:8080',
'DEBUG': True,
'BIND_HOST': '0.0.0.0',
......@@ -68,7 +69,10 @@ class Coco:
@property
def name(self):
return self.config["NAME"]
if self.config['NAME']:
return self.config['NAME']
else:
return self.config['DEFAULT_NAME']
@property
def service(self):
......
......@@ -12,7 +12,7 @@ class Config:
Coco config file
"""
# 默认的名字
NAME = os.environ.get("APP_NAME") or None
NAME = os.environ.get("NAME") or None
# Jumpserver项目的url, api请求注册会使用
CORE_HOST = os.environ.get("CORE_HOST") or 'http://core:8080'
......
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