Comments (3)
That looks like it should be working at first glance. You'll need to dig-in here: can you debug the group send call? What's not working? (Do you have a Redis connection? Is anything posted? Is the event loop running, etc.)
There's not enough here for me to say anything more concrete I'm afraid.
from channels.
@carltongibson For more clarification there is a Redis connection when getting the channel_layer. However, I cannot retrieve the event loop (states that one doesn't exist when checking with asyncio) while handling HTTP Requests through my create method in the view. This is while my websocket connection is still live and I can fire off the management commands separately during the create call handling just fine and receive the management command message on the other end. From the looks of it, inside of the RedisChannelLayer.group_send() it does not get connections through self.connection() because asyncio.get_running_loop() is not returning an active loop. So the biggest question would be why isn't the websocket event loop available within the context of the view.
from channels.
From the looks of it, inside of the RedisChannelLayer.group_send() it does not get connections through self.connection() because asyncio.get_running_loop() is not returning an active loop.
Could you provide a minimal reproduce?
from channels.
Related Issues (20)
- OriginValidator could raise exception/log message for denied connections HOT 1
- Unable to collect code coverage when using `ChannelsLiveServerTestCase` HOT 14
- error in channel layer explanations HOT 2
- adding a check if group_name exists method for channel_layer HOT 1
- Small messages are getting concatenated HOT 2
- How can I change the schema in the database? HOT 1
- How to test send_json() contents when passing close=True HOT 2
- Handler declaration by decorator/annotation (in order to prevent potential method leaks) HOT 1
- django-q2 and django-channels together HOT 1
- Add CORs middleware HOT 1
- Breakage in routing.py on django/main pre-5.1.
- Use Django async-native APIs where possible HOT 9
- Django Channels Memory Leak on every message or connection HOT 28
- WARNING daphne.server ASGIStaticFilesHandler WebRequest took too long to shut down and was killed HOT 4
- Use group_send() when group is empty HOT 1
- Session Data Corrupted HOT 1
- Error with send_json Function in AsyncJsonWebsocketConsumer HOT 6
- Getting TypeError: SSEConsumer() missing 2 required positional arguments: 'receive' and 'send'
- django.core.exceptions.SynchronousOnlyOperation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from channels.