Skip to content
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

Merged
merged 1 commit into from
Oct 3, 2022
Merged

callback hook #53

merged 1 commit into from
Oct 3, 2022

Conversation

kafonek
Copy link
Contributor

@kafonek kafonek commented Sep 30, 2022

Primary goal here is to be able to add the topic to logs in callback functions.

This was referenced Sep 30, 2022
@kafonek
Copy link
Contributor Author

kafonek commented Sep 30, 2022

Current dependencies on/for this PR:

This comment was auto-generated by Graphite.

@kafonek
Copy link
Contributor Author

kafonek commented Sep 30, 2022

Current dependencies on/for this PR:

This comment was auto-generated by Graphite.

@kafonek kafonek force-pushed the mrk/zmq-polling-refactor branch from 62dc3b6 to e276894 Compare September 30, 2022 18:15
@kafonek kafonek force-pushed the mrk/zmq-polling-refactor branch from e276894 to a352b19 Compare September 30, 2022 18:20
@kafonek kafonek marked this pull request as ready for review September 30, 2022 18:24
@kafonek kafonek requested a review from a team September 30, 2022 18:24
@@ -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
Copy link
Contributor

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):
        ...

Copy link
Contributor Author

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. 🙇‍♂️

@kafonek kafonek force-pushed the mrk/zmq-polling-refactor branch from a352b19 to 9f0860e Compare September 30, 2022 20:36
@kafonek kafonek force-pushed the mrk/callback-hook branch 2 times, most recently from 6ab6522 to 160a499 Compare October 1, 2022 14:07
@kafonek kafonek force-pushed the mrk/zmq-polling-refactor branch from 46c3970 to 3e6ce75 Compare October 3, 2022 13:52
@kafonek kafonek force-pushed the mrk/callback-hook branch 5 times, most recently from 866a8ac to 6d9b823 Compare October 3, 2022 15:52
Base automatically changed from mrk/zmq-polling-refactor to main October 3, 2022 16:30
@kafonek kafonek force-pushed the mrk/callback-hook branch from 6d9b823 to 72a5b9e Compare October 3, 2022 16:32
@kafonek kafonek merged commit 55a5cea into main Oct 3, 2022
@kafonek kafonek deleted the mrk/callback-hook branch October 3, 2022 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants