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
1434afab
Commit
1434afab
authored
Feb 27, 2018
by
广宏伟
Browse files
Options
Browse Files
Download
Plain Diff
Merged in test (pull request #21)
Test
parents
e50f93e3
900a61be
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
models.py
coco/models.py
+1
-0
recorder.py
coco/recorder.py
+4
-2
No files found.
coco/models.py
View file @
1434afab
...
...
@@ -136,6 +136,7 @@ class Server:
def
close
(
self
):
logger
.
info
(
"Closed server {}"
.
format
(
self
))
self
.
send
(
b
''
)
self
.
chan
.
close
()
self
.
stop_evt
.
set
()
self
.
chan
.
close
()
...
...
coco/recorder.py
View file @
1434afab
...
...
@@ -269,8 +269,9 @@ class S3ReplayRecorder(ServerReplayRecorder):
def
get_command_recorder_class
(
config
):
command_storage
=
config
[
"COMMAND_STORAGE"
]
storage_type
=
command_storage
.
get
(
'TYPE'
)
if
command_storage
[
'TYPE'
]
==
"elasticsearch"
:
if
storage_type
==
"elasticsearch"
:
return
ESCommandRecorder
else
:
return
ServerCommandRecorder
...
...
@@ -278,7 +279,8 @@ def get_command_recorder_class(config):
def
get_replay_recorder_class
(
config
):
replay_storage
=
config
[
"REPLAY_STORAGE"
]
if
replay_storage
[
'TYPE'
]
==
"s3"
:
storage_type
=
replay_storage
.
get
(
'TYPE'
)
if
storage_type
==
"s3"
:
return
S3ReplayRecorder
else
:
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