Django Channels 2.0.0 groups

2018-02-02 Thread Ahmed Magdy
I'm relatively new to channels and was using Channels v1.x.x groups easily, but after v2.0.0 update and reading the documentation # This example uses WebSocket consumer, which is synchronous, and so # needs the async channel layer functions to be converted. from asgiref.sync import AsyncToSync

Re: Django Channels 2.0.0 groups

2018-02-02 Thread Ahmed Magdy
value to work - what value were you trying that was > not empty? > > Andrew > > On Fri, Feb 2, 2018 at 8:04 PM, Ahmed Magdy <ahmed...@gmail.com > > wrote: > >> I tried not having CHANNEL_LAYERS or setting it to {} >> same exception >> >> On Satu

Re: Django Channels 2.0.0 groups

2018-02-02 Thread Ahmed Magdy
must put something into the settings in order to make it > function. > > Andrew > > On Fri, Feb 2, 2018 at 8:42 PM, Ahmed Magdy <ahmed...@gmail.com > > wrote: > >> I thought it uses in memory channel layer by default if it's empty? I >> didn't try setting a v

Re: Django Channels 2.0.0 groups

2018-02-02 Thread Ahmed Magdy
te-packages\aioredis\pool.py", > line 56, in create_pool > await pool._fill_free(override_min=False) > File > "D:\Programming\DjangoWebsite\HUWebsite\lib\site-packages\aioredis\pool.py", > line 388, in _fill_free > conn = await self._create_new_connection(ad

Re: Django Channels 2.0.0 groups

2018-02-03 Thread Ahmed Magdy
h, yes, it looks like aioredis requires at least 3.5.2. I will update the > channels_redis readme to make this clear. > > On Fri, Feb 2, 2018 at 11:44 PM, Ahmed Magdy <ahmed...@gmail.com > > wrote: > >> v3.5.1:37a07cee5969 >> >> On Saturday, February 3,

Re: Django Channels 2.0.0 groups

2018-02-02 Thread Ahmed Magdy
I tried not having CHANNEL_LAYERS or setting it to {} same exception On Saturday, February 3, 2018 at 3:36:43 AM UTC+2, Andrew Godwin wrote: > > Do you have a CHANNEL_LAYERS setting in your settings file? If so, what is > it set to? > > Andrew > > On Fri, Feb 2, 2018 at

Re: Django Channels 2.0.0 groups

2018-02-02 Thread Ahmed Magdy
6, in get_event_loop > return get_event_loop_policy().get_event_loop() > File "c:\python35\Lib\asyncio\events.py", line 572, in get_event_loop > % threading.current_thread().name) > There is no current event loop in thread 'Thread-3'. > Thanks for what you did so far! On Saturday,

Re: Django Channels 2.0.0 groups

2018-02-02 Thread Ahmed Magdy
v3.5.1:37a07cee5969 On Saturday, February 3, 2018 at 9:41:38 AM UTC+2, Andrew Godwin wrote: > > That looks like a problem with the version of Python you are running - > what version is it? > > Andrew > > On Fri, Feb 2, 2018 at 11:36 PM, Ahmed Magdy <ahmed...@gmail.com &

Re: Django Channels 2.0.0 groups

2018-02-02 Thread Ahmed Magdy
attribute 'group_add' > [2018/02/03 03:14:32] WebSocket DISCONNECT /sessions/ [127.0.0.1:8631] > On Friday, February 2, 2018 at 7:37:36 PM UTC+2, Andrew Godwin wrote: > > Hi Ahmed, > > In the new release channel layers are optional - if you don't configure > them they

Channels websocket disconnecting after ~1min

2018-02-04 Thread Ahmed Magdy
Hello, and sorry for lots of questions about channels. I can connect to the websocket from JavaScript and send/receive normally for exactly 60~61sec after that the HTTP request is repeated on it's own and the websocket disconnects. Sometimes the HTTP get request is repeated more than once

Re: Channels websocket disconnecting after ~1min

2018-02-04 Thread Ahmed Magdy
gt; Andrew > > On Sun, Feb 4, 2018 at 3:49 PM, Ahmed Magdy <ahmed...@gmail.com > > wrote: > >> Hello, and sorry for lots of questions about channels. >> >> I can connect to the websocket from JavaScript and send/receive normally >> for exact

Channels v2.0 - 'RedisChannelLayer' object has no attribute 'ChannelFull'

2018-02-04 Thread Ahmed Magdy
Sending 10~12 messages to the websocket raises an exception 'RedisChannelLayer' object has no attribute 'ChannelFull' > Trace ERROR:root:Exception inside application: 'RedisChannelLayer' object has no > attribute 'ChannelFull' > File >

channels v2.0.0 disconnect function not triggering

2018-02-05 Thread Ahmed Magdy
It seems like I cannot get the disconnect function in the consumer to get called at all. class ChatConsumer(WebsocketConsumer): def connect(self): self.accept() def disconnect(self): print('disconnected') Using self.close from the consumer, or closing the javascript