Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
zodb
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Joshua
zodb
Commits
d0f9a9b4
Commit
d0f9a9b4
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
c9116c71
Changes
1
Hide 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 @
d0f9a9b4
...
@@ -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