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
7227baa8
Commit
7227baa8
authored
Dec 03, 2017
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Change] 修改session id字段
parent
a8b07acb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
10 deletions
+4
-10
app.py
coco/app.py
+3
-9
session.py
coco/session.py
+1
-1
No files found.
coco/app.py
View file @
7227baa8
...
...
@@ -146,24 +146,18 @@ class Coco:
def
keep_push_record
(
self
):
threads
=
[]
def
push_command
(
q
,
callback
,
size
=
10
):
while
not
self
.
stop_evt
.
is_set
():
data_set
=
q
.
mget
(
size
)
if
data_set
and
not
callback
(
data_set
):
q
.
mput
(
data_set
)
def
push_replay
(
q
,
callback
,
size
=
10
):
def
worker
(
q
,
callback
,
size
=
10
):
while
not
self
.
stop_evt
.
is_set
():
data_set
=
q
.
mget
(
size
)
if
data_set
and
not
callback
(
data_set
):
q
.
mput
(
data_set
)
for
i
in
range
(
self
.
config
[
'MAX_PUSH_THREADS'
]):
t
=
threading
.
Thread
(
target
=
push_command
,
args
=
(
t
=
threading
.
Thread
(
target
=
worker
,
args
=
(
self
.
_command_queue
,
self
.
_command_recorder
.
record_command
,
))
threads
.
append
(
t
)
t
=
threading
.
Thread
(
target
=
push_replay
,
args
=
(
t
=
threading
.
Thread
(
target
=
worker
,
args
=
(
self
.
_replay_queue
,
self
.
_replay_recorder
.
record_replay
,
))
threads
.
append
(
t
)
...
...
coco/session.py
View file @
7227baa8
...
...
@@ -139,7 +139,7 @@ class Session:
def
to_json
(
self
):
return
{
"
uu
id"
:
self
.
id
,
"id"
:
self
.
id
,
"user"
:
self
.
client
.
user
.
username
,
"asset"
:
self
.
server
.
asset
.
hostname
,
"system_user"
:
self
.
server
.
system_user
.
username
,
...
...
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