Re: Channels: launching a custom co-routine from SyncConsumer

2019-08-30 Thread Ezequias Rocha
Sorry my dalay also. My problem is that I was looking for a wrong PostgreSQL sequence. My fault, my totally fault. Django rocks! Sincerely Ezequias Rocha On Wednesday, August 28, 2019 at 11:26:25 AM UTC-3, Dan Merillat wrote: > > On 8/15/19 11:10 PM, Andrew Godwin wrote: > > SyncConsumer isn't

Re: Channels: launching a custom co-routine from SyncConsumer

2019-08-28 Thread Dan Merillat
On 8/15/19 11:10 PM, Andrew Godwin wrote: > SyncConsumer isn't async - it runs inside a separate synchronous thread. > You'll need to get the event loop from the other thread and use > call_soon_threadsafe instead! Sorry for the delay in getting back to you, it took me a while to go through the di

Re: Channels: launching a custom co-routine from SyncConsumer

2019-08-15 Thread Andrew Godwin
SyncConsumer isn't async - it runs inside a separate synchronous thread. You'll need to get the event loop from the other thread and use call_soon_threadsafe instead! Andrew On Wed, Aug 14, 2019 at 6:59 PM Dan Merillat wrote: > > I have an application that's 99% using the ORM and database work

Channels: launching a custom co-routine from SyncConsumer

2019-08-14 Thread Dan Merillat
I have an application that's 99% using the ORM and database work so it is using SyncConsumer. However, I have one minor part that needs to use a timer, and I cannot get it to work for the life of me. In an AsyncConsumer, I can use asyncio.ensure_future(self.coroutine()) to start a timer. In s