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
49d0c399
Commit
49d0c399
authored
Nov 28, 2017
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Feture] 上传命令记录
parent
a0a71d8d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
record.py
coco/record.py
+2
-2
conf_example.py
conf_example.py
+3
-0
No files found.
coco/record.py
View file @
49d0c399
...
@@ -185,7 +185,7 @@ class ServerCommandRecorder(LocalFileCommandRecorder):
...
@@ -185,7 +185,7 @@ class ServerCommandRecorder(LocalFileCommandRecorder):
def
record_command
(
self
,
now
,
_input
,
_output
):
def
record_command
(
self
,
now
,
_input
,
_output
):
logger
.
debug
(
"File recorder command: ({},{})"
.
format
(
_input
,
_output
))
logger
.
debug
(
"File recorder command: ({},{})"
.
format
(
_input
,
_output
))
self
.
cmd_f
.
write
(
"{}
{}
{}
\n
"
.
format
(
self
.
cmd_f
.
write
(
"{}
|{}|
{}
\n
"
.
format
(
int
(
now
.
timestamp
()),
int
(
now
.
timestamp
()),
base64
.
b64encode
(
_input
.
encode
(
"utf-8"
))
.
decode
(
'utf-8'
),
base64
.
b64encode
(
_input
.
encode
(
"utf-8"
))
.
decode
(
'utf-8'
),
base64
.
b64encode
(
_output
.
encode
(
"utf-8"
))
.
decode
(
'utf-8'
),
base64
.
b64encode
(
_output
.
encode
(
"utf-8"
))
.
decode
(
'utf-8'
),
...
@@ -210,7 +210,7 @@ class ServerCommandRecorder(LocalFileCommandRecorder):
...
@@ -210,7 +210,7 @@ class ServerCommandRecorder(LocalFileCommandRecorder):
def
push_archive_record
(
self
,
archive
):
def
push_archive_record
(
self
,
archive
):
logger
.
debug
(
"Start push command record to server"
)
logger
.
debug
(
"Start push command record to server"
)
return
self
.
app
.
service
.
push_session_
replay
(
archive
,
str
(
self
.
session
.
id
))
return
self
.
app
.
service
.
push_session_
command
(
archive
,
str
(
self
.
session
.
id
))
def
push_record
(
self
):
def
push_record
(
self
):
logger
.
info
(
"Start push command record to server"
)
logger
.
info
(
"Start push command record to server"
)
...
...
conf_example.py
View file @
49d0c399
...
@@ -53,3 +53,6 @@ APP_NAME = "coco"
...
@@ -53,3 +53,6 @@ APP_NAME = "coco"
# 异步上报统计命令
# 异步上报统计命令
# COMMAND_PUSH_ASYNC = True
# COMMAND_PUSH_ASYNC = True
# Admin的名字,出问题会提示给用户
# ADMINS = ''
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