Re: Overriding channel-layer's group_send and group_add to add persistence

2018-04-01 Thread 'Alex' via Django users
I have a partial solution to this, if anybody is interested. For some reason, creating a new version of the core.py file in which RedisChannelLayer is defined, and editing it directly, gave the desired results. It was something about overriding only part of it, but I have no idea what! On

Re: Overriding channel-layer's group_send and group_add to add persistence

2018-03-23 Thread 'Alex' via Django users
I've just checked, and self.consistent_hash(group) returns '0' in both functions, so it should be connecting to the same db... On Friday, 23 March 2018 16:05:16 UTC, Andrew Godwin wrote: > > I would check the connection is going to the right server/database as > well? But past that, I can't

Re: Overriding channel-layer's group_send and group_add to add persistence

2018-03-23 Thread 'Alex' via Django users
That did occur to me, but both connect using the function below, so unless they're somehow referring to different groups, I'm not sure how they could be going to different servers/databases... async with self.connection(self.consistent_hash(group)) as connection: On Friday, 23 March 2018

Re: Overriding channel-layer's group_send and group_add to add persistence

2018-03-23 Thread Andrew Godwin
I would check the connection is going to the right server/database as well? But past that, I can't help you - I'd try doing some things with plain aioredis to see if you can replicate it there. Andrew On Fri, Mar 23, 2018 at 9:01 AM, 'Alex' via Django users < django-users@googlegroups.com>

Re: Overriding channel-layer's group_send and group_add to add persistence

2018-03-23 Thread 'Alex' via Django users
Hi, I've used the redis-cli to get the contents of the key, and it has filled it properly, so the information is definitely in redis under that key. The issue seems to be that message = await connection.get(pers_key) always returns none. One thing I'm certain of is that it's in redis! Alex

Re: Overriding channel-layer's group_send and group_add to add persistence

2018-03-23 Thread Andrew Godwin
It looks correct at first glance - I would insert a debugger there and see what the Redis database contained manually at that point. Andrew On Fri, Mar 23, 2018 at 2:56 AM, 'Alex' via Django users < django-users@googlegroups.com> wrote: > I've been trying to add persistence to channel layers,