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
66f4e83c
Commit
66f4e83c
authored
Feb 27, 2018
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Bugfix] 修改获取recorder配置的api
parent
680816ab
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
models.py
coco/models.py
+1
-0
recorder.py
coco/recorder.py
+2
-2
No files found.
coco/models.py
View file @
66f4e83c
...
@@ -136,6 +136,7 @@ class Server:
...
@@ -136,6 +136,7 @@ class Server:
def
close
(
self
):
def
close
(
self
):
logger
.
info
(
"Closed server {}"
.
format
(
self
))
logger
.
info
(
"Closed server {}"
.
format
(
self
))
self
.
send
(
b
''
)
self
.
chan
.
close
()
self
.
chan
.
close
()
self
.
stop_evt
.
set
()
self
.
stop_evt
.
set
()
self
.
chan
.
close
()
self
.
chan
.
close
()
...
...
coco/recorder.py
View file @
66f4e83c
...
@@ -270,7 +270,7 @@ class S3ReplayRecorder(ServerReplayRecorder):
...
@@ -270,7 +270,7 @@ class S3ReplayRecorder(ServerReplayRecorder):
def
get_command_recorder_class
(
config
):
def
get_command_recorder_class
(
config
):
command_storage
=
config
[
"COMMAND_STORAGE"
]
command_storage
=
config
[
"COMMAND_STORAGE"
]
if
command_storage
[
'TYPE'
]
==
"elasticsearch"
:
if
command_storage
.
get
(
'TYPE'
)
==
"elasticsearch"
:
return
ESCommandRecorder
return
ESCommandRecorder
else
:
else
:
return
ServerCommandRecorder
return
ServerCommandRecorder
...
@@ -278,7 +278,7 @@ def get_command_recorder_class(config):
...
@@ -278,7 +278,7 @@ def get_command_recorder_class(config):
def
get_replay_recorder_class
(
config
):
def
get_replay_recorder_class
(
config
):
replay_storage
=
config
[
"REPLAY_STORAGE"
]
replay_storage
=
config
[
"REPLAY_STORAGE"
]
if
replay_storage
[
'TYPE'
]
==
"s3"
:
if
replay_storage
.
get
(
'TYPE'
)
==
"s3"
:
return
S3ReplayRecorder
return
S3ReplayRecorder
else
:
else
:
return
ServerReplayRecorder
return
ServerReplayRecorder
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