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
4ae7b664
You need to sign in or sign up before continuing.
Commit
4ae7b664
authored
Dec 31, 2017
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Bugfix] 修改session json
parent
49790646
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
session.py
coco/session.py
+3
-3
No files found.
coco/session.py
View file @
4ae7b664
...
@@ -21,7 +21,7 @@ class Session:
...
@@ -21,7 +21,7 @@ class Session:
self
.
_sharers
=
[]
# Join to the session, read and write
self
.
_sharers
=
[]
# Join to the session, read and write
self
.
replaying
=
True
self
.
replaying
=
True
self
.
date_created
=
datetime
.
datetime
.
now
()
self
.
date_created
=
datetime
.
datetime
.
now
()
self
.
date_
finishe
d
=
None
self
.
date_
en
d
=
None
self
.
stop_evt
=
threading
.
Event
()
self
.
stop_evt
=
threading
.
Event
()
self
.
sel
=
selectors
.
DefaultSelector
()
self
.
sel
=
selectors
.
DefaultSelector
()
self
.
_command_recorder
=
command_recorder
self
.
_command_recorder
=
command_recorder
...
@@ -160,7 +160,7 @@ class Session:
...
@@ -160,7 +160,7 @@ class Session:
logger
.
info
(
"Close the session: {} "
.
format
(
self
.
id
))
logger
.
info
(
"Close the session: {} "
.
format
(
self
.
id
))
self
.
stop_evt
.
set
()
self
.
stop_evt
.
set
()
self
.
post_bridge
()
self
.
post_bridge
()
self
.
date_
finishe
d
=
datetime
.
datetime
.
now
()
self
.
date_
en
d
=
datetime
.
datetime
.
now
()
self
.
server
.
close
()
self
.
server
.
close
()
def
to_json
(
self
):
def
to_json
(
self
):
...
@@ -172,7 +172,7 @@ class Session:
...
@@ -172,7 +172,7 @@ class Session:
"login_from"
:
"ST"
,
"login_from"
:
"ST"
,
"is_finished"
:
True
if
self
.
stop_evt
.
is_set
()
else
False
,
"is_finished"
:
True
if
self
.
stop_evt
.
is_set
()
else
False
,
"date_start"
:
self
.
date_created
.
strftime
(
"
%
Y-
%
m-
%
d
%
H:
%
M:
%
S"
),
"date_start"
:
self
.
date_created
.
strftime
(
"
%
Y-
%
m-
%
d
%
H:
%
M:
%
S"
),
"date_
finished"
:
self
.
date_finished
.
strftime
(
"
%
Y-
%
m-
%
d
%
H:
%
M:
%
S"
)
if
self
.
date_finishe
d
else
None
"date_
end"
:
self
.
date_end
.
strftime
(
"
%
Y-
%
m-
%
d
%
H:
%
M:
%
S"
)
if
self
.
date_en
d
else
None
}
}
def
__str__
(
self
):
def
__str__
(
self
):
...
...
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