-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
callback hook #53
callback hook #53
Conversation
Current dependencies on/for this PR:
This comment was auto-generated by Graphite. |
Current dependencies on/for this PR: This comment was auto-generated by Graphite. |
62dc3b6
to
e276894
Compare
07124fe
to
6ee25d6
Compare
e276894
to
a352b19
Compare
6ee25d6
to
9679779
Compare
@@ -68,15 +68,25 @@ def __init__(self): | |||
if not hasattr(self, "inbound_message_hook"): | |||
# Called by _inbound_worker when picking up a message from inbound queue | |||
# Primarily used for deserializing messages from the wire | |||
# Will get one argument: incoming "raw" message content over the wire |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be useful to use typing.Protocol
for these:
class InboundMessageHook(typing.Protocol):
async def __call__(self, raw: bytes):
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
neat, will look into this for future upgrades. 🙇♂️
a352b19
to
9f0860e
Compare
6ab6522
to
160a499
Compare
46c3970
to
3e6ce75
Compare
866a8ac
to
6d9b823
Compare
6d9b823
to
72a5b9e
Compare
Primary goal here is to be able to add the
topic
to logs in callback functions.