Re: Problem with sending django channels event from models

2018-07-31 Thread Andrew Godwin
Yes, you can't just call "group_send" without awaiting it, or you'll get those warnings. You need async_to_sync, I'm afraid. Otherwise, you're not actually waiting for the group_send function to finish and you'll start getting some unreliable test results. Andrew On Tue, Jul 31, 2018 at 6:14 AM l

Re: Problem with sending django channels event from models

2018-07-31 Thread luan fonceca
Hello Andrew, sorry for the lack of traceback on the gist. I have changed my code a bit, i was using the `async_to_sync` but now i'm using this way inside my User save method: channel_layer = get_channel_layer() channel_layer.group_send( 'users_{}'.format(self.pk), { 'type': 'users.pos

Re: Problem with sending django channels event from models

2018-07-27 Thread Andrew Godwin
You need to post the full traceback, not just the last section. I suspect what you are doing is calling model methods directly in an async function, but I can't confirm that without a full traceback. Andrew On Thu, Jul 26, 2018 at 1:10 PM luan fonceca wrote: > Hello, i'm trying to implement a "