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

Change arguments format in endpoints #25

Closed
artas728 opened this issue Mar 4, 2021 · 0 comments
Closed

Change arguments format in endpoints #25

artas728 opened this issue Mar 4, 2021 · 0 comments
Assignees
Projects

Comments

@artas728
Copy link
Collaborator

artas728 commented Mar 4, 2021

Update arguments format in endpoints

from:

@app.listen("some.publish.subject")
async def receive_messages(subject, message):
    print(f"got message {message}")

to

@app.listen("some.publish.subject")
async def receive_messages(msg):
    print(f"got message {msg.parsed_data}")

where msg is an object that keeps many parameters:

msg.subject
msg.data                    #raw data
msg.parsed_data       #handled data
msg.header
msg.any_another_parameter
@artas728 artas728 self-assigned this Mar 4, 2021
@artas728 artas728 added this to To do in v1.0 Mar 4, 2021
@artas728 artas728 moved this from To do to In progress in v1.0 Mar 4, 2021
@artas728 artas728 moved this from In progress to Acceptance in v1.0 Mar 11, 2021
@artas728 artas728 moved this from Acceptance to Done in v1.0 Mar 11, 2021
@Tulsene Tulsene closed this as completed Mar 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
v1.0
Done
Development

No branches or pull requests

2 participants