Skip to content
Discussion options

You must be logged in to vote

Why not? You can create subscriber object, store it somewhere and use it as a decorator later

sub = broker.subscriber(...)

@sub
async def handler(): ...

subscribers = {"sub_id": sub}

I don't think, that the case relates to framework - it is just about code organization

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by pbonneaudiabolocom
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants