Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZEO
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
ZEO
Commits
c0fdcedd
Commit
c0fdcedd
authored
May 04, 2010
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Gave delay objects a repr for debugging purposes.
parent
954cda64
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
src/ZEO/zrpc/connection.py
src/ZEO/zrpc/connection.py
+8
-0
No files found.
src/ZEO/zrpc/connection.py
View file @
c0fdcedd
...
@@ -44,17 +44,25 @@ class Delay:
...
@@ -44,17 +44,25 @@ class Delay:
the mainloop from sending a response.
the mainloop from sending a response.
"""
"""
msgid
=
conn
=
sent
=
None
def
set_sender
(
self
,
msgid
,
conn
):
def
set_sender
(
self
,
msgid
,
conn
):
self
.
msgid
=
msgid
self
.
msgid
=
msgid
self
.
conn
=
conn
self
.
conn
=
conn
def
reply
(
self
,
obj
):
def
reply
(
self
,
obj
):
self
.
sent
=
'reply'
self
.
conn
.
send_reply
(
self
.
msgid
,
obj
)
self
.
conn
.
send_reply
(
self
.
msgid
,
obj
)
def
error
(
self
,
exc_info
):
def
error
(
self
,
exc_info
):
self
.
sent
=
'error'
log
(
"Error raised in delayed method"
,
logging
.
ERROR
,
exc_info
=
True
)
log
(
"Error raised in delayed method"
,
logging
.
ERROR
,
exc_info
=
True
)
self
.
conn
.
return_error
(
self
.
msgid
,
*
exc_info
[:
2
])
self
.
conn
.
return_error
(
self
.
msgid
,
*
exc_info
[:
2
])
def
__repr__
(
self
):
return
"%s[%s, %r, %r, %r]"
%
(
self
.
__class__
.
__name__
,
id
(
self
),
self
.
msgid
,
self
.
conn
,
self
.
sent
)
class
Result
(
Delay
):
class
Result
(
Delay
):
def
__init__
(
self
,
*
args
):
def
__init__
(
self
,
*
args
):
...
...
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