-
-
Notifications
You must be signed in to change notification settings - Fork 799
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
Sending to group does not work if called in catch block or subsequently after exception processing #1961
Comments
Can you provided a minimal running reproduce please? I suspect there's a task (consumer?) being cancelled, but it's not possible to say without code. Note: minimal — please take the time to reduce it. Thanks. |
@carltongibson Is it necessary? It's not really about the SharePoint library that I am using; rather than that, if I trigger any exception and want to send a message about it, it just does nothing. Furthermore, the WebSocket from a client (fronted) remains open. To reproduce the error, you need to trigger the error inside a Celery and in the Anyway, suppose you insist on providing some running examples. What all sources do you need since we talk about the regular Django application and the minimal running sample does not bring any benefits? |
@MichalKyjovsky A runnable reproduce is necessary yes. You're saying there's a bug. Without a reproduce that's hard to verify. I'm afraid I don't have the time it would take to reconstruct the reproduce for your problem from the information you've given. You're seeing it: it's much easier for you to create a minimal sample project.
Exactly. So a minimal example excludes all that is not relevant. That way it's possible to see what the error is in Channels, if there is one, or in your project, which you may discover whilst working on the reproduce. |
An unexpected behaviour occurs when trying to send a message to the group via the Redis channel when called from the celery shared task in the except block or any subsequent code if the exception occurs.
OS: macOS: 13.0.1 (22A400)
Browser: Google Chrome (Version 108.0.5359.98 (Official Build) (arm64))
Server: Django Daphne ASGI Server
pip freeze
I have the following celery shared task:
Expected Behaviour
When the exception is thrown, an error message is sent via channels to the subscribed group, and the client is notified.
Actual Behaviour
The problem is that when an exception is thrown, then both print messages are called; however, no message is sent to the group, and therefore client gets no notification. When no exception is thrown, then everything works as expected.
Logs
No logs are provided as the system acts like everything is alright.
Please also try and include, if you can:
Channels Configuration
Daphne and build the server of the React client. An issue occurred in the development environment.
settings.py :
asgi.py
The text was updated successfully, but these errors were encountered: