Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
coco
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ops
coco
Commits
9107015c
Commit
9107015c
authored
Jan 22, 2018
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Update] 修改依赖和配置文件
parent
491ef181
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
4 deletions
+8
-4
app.py
coco/app.py
+5
-2
logger.py
coco/logger.py
+1
-0
conf_example.py
conf_example.py
+1
-1
requirements.txt
requirements/requirements.txt
+1
-1
No files found.
coco/app.py
View file @
9107015c
...
...
@@ -52,10 +52,9 @@ class Coco:
'REPLAY_RECORD_ENGINE'
:
'server'
,
}
def
__init__
(
self
,
name
=
None
,
root_path
=
None
):
def
__init__
(
self
,
root_path
=
None
):
self
.
root_path
=
root_path
if
root_path
else
BASE_DIR
self
.
config
=
self
.
config_class
(
self
.
root_path
,
defaults
=
self
.
default_config
)
self
.
name
=
name
if
name
else
self
.
config
[
"NAME"
]
self
.
sessions
=
[]
self
.
clients
=
[]
self
.
lock
=
threading
.
Lock
()
...
...
@@ -67,6 +66,10 @@ class Coco:
self
.
command_recorder_class
=
None
self
.
_task_handler
=
None
@property
def
name
(
self
):
return
self
.
config
[
"NAME"
]
@property
def
service
(
self
):
if
self
.
_service
is
None
:
...
...
coco/logger.py
View file @
9107015c
...
...
@@ -48,6 +48,7 @@ def create_logger(app):
loggers
=
{
'coco'
:
main_setting
,
'paramiko'
:
main_setting
,
'jms'
:
main_setting
,
}
)
...
...
conf_example.py
View file @
9107015c
...
...
@@ -12,7 +12,7 @@ class Config:
Coco config file, coco also load config from server update setting below
"""
# 项目名称, 会用来向Jumpserver注册, 识别而已, 不能重复
#
APP_
NAME = "localhost"
# NAME = "localhost"
# Jumpserver项目的url, api请求注册会使用
# CORE_HOST = os.environ.get("CORE_HOST") or 'http://127.0.0.1:8080'
...
...
requirements/requirements.txt
View file @
9107015c
...
...
@@ -28,5 +28,5 @@ tornado==4.5.2
urllib3==1.22
wcwidth==0.1.7
werkzeug==0.12.2
jumpserver-python-sdk==0.0.2
5
jumpserver-python-sdk==0.0.2
6
jms-es-sdk
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment