-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Sanic.event() fires when any event in the group is dispatched #2826
Labels
Comments
talljosh
added a commit
to talljosh/sanic
that referenced
this issue
Sep 23, 2023
…fire for the specific requested event (sanic-org#2826)
I'm working on a potential fix for this in https://github.com/talljosh/sanic. I've done a basic fix, but I'd like to update it to allow |
talljosh
added a commit
to talljosh/sanic
that referenced
this issue
Sep 24, 2023
…fire for the specific requested event (sanic-org#2826)
talljosh
added a commit
to talljosh/sanic
that referenced
this issue
Sep 24, 2023
…fire for the specific requested event (sanic-org#2826)
talljosh
added a commit
to talljosh/sanic
that referenced
this issue
Sep 25, 2023
…fire for the specific requested event (sanic-org#2826). Also added support for passing conditions= and exclusive= arguments to app.event().
talljosh
added a commit
to talljosh/sanic
that referenced
this issue
Sep 25, 2023
…fire for the specific requested event (sanic-org#2826). Also added support for passing conditions= and exclusive= arguments to app.event().
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is there an existing issue for this?
Describe the bug
When I wait for an event:
The event fires when another signal/event in the same event group is dispatched:
This appears to be because of this section of
signals.py
, which callsset()
on every event in the event group.This is unexpected behaviour. If I wait for a particular event, I don't expect the future to return until that particular event is dispatched.
Code snippet
Expected Behavior
I do not expect this code to raise an AssertionError, but it does.
How do you run Sanic?
Sanic CLI
Operating System
Linux
Sanic Version
23.3.0
Additional context
No response
The text was updated successfully, but these errors were encountered: