Channels 2: Consumer lifecycle when run in a worker process

2018-05-02 Thread Alexander Prokhorov
Dear Andrew, I would like to ask couple of questions about the lifecycle of consumers running in Channels workers and serving custom channels. Consider a consumer: # myconsumer.py class MyConsumer(channels.consumer.AsyncConsumer): async def wakeup(self, message): await some_process

Re: Channels 2: Consumer lifecycle when run in a worker process

2018-05-02 Thread Alexander Prokhorov
g handled by different instances. > > Andrew > > On Wed, May 2, 2018 at 7:50 AM Alexander Prokhorov > wrote: > >> Dear Andrew, >> >> I would like to ask couple of questions about the lifecycle of consumers >> running in Channels workers and serving custom chan

Re: Channels 2: Consumer lifecycle when run in a worker process

2018-05-02 Thread Alexander Prokhorov
implementation, the best way to > process things in parallel would be to spin off things into their own > coroutines within your handler - either manually, using > EventLoop.create_task, or I guess you could slew it out into > different-named channels. > > Andrew > >

Re: Channels 2: Consumer lifecycle when run in a worker process

2018-05-02 Thread Alexander Prokhorov
change the logic yourself, I imagine. > > Andrew > > On Wed, May 2, 2018 at 1:12 PM Alexander Prokhorov > wrote: > >> >> Indeed, that is exactly what I am doing - run processing in the >> background with >> >> task = asyncio.ensure_future(database_sync_t

Re: Django-channels and JSON-RPC

2017-01-22 Thread Alexander Prokhorov
If you are going to implement JSON-RPC based on Channels, I would be happy to participate, I suppose we will start doing this in a few week anyway. пятница, 20 января 2017 г., 13:36:49 UTC+3 пользователь Fabien Millerand написал: > > Thanks a lot for your answer Andrew. > > On a side note, would

Re: Django-channels and JSON-RPC

2017-01-24 Thread Alexander Prokhorov
y to share my work and get some feedback/help on > this project. Let me know your github username and we can colaborate > > Cheers > Fab > > Le dimanche 22 janvier 2017 15:18:03 UTC+1, Alexander Prokhorov a écrit : >> >> If you are going to implement JSON-RPC based on

Re: Django-channels and JSON-RPC

2017-01-25 Thread Alexander Prokhorov
Colleagues, you are really fast :) How can I help you? For our project we will definitely need a JavaScript client. Quick googling led me to https://github.com/JsCommunity/jsonrpc-websocket-client it does not look mature, but such client is quite easy to implement. Do you have plans to include

Re: Django-channels and JSON-RPC

2017-01-26 Thread Alexander Prokhorov
Dear Colleagues, I've made some fixes in the code (most of them concerns Python 3 compatibility). I also added a test showing a problem with some kind of name clash. пятница, 27 января 2017 г., 1:07:38 UTC+3 пользователь Fabien Millerand написал: > > Yes, that was my thought as well... > > Wi

Attach consumer to dynamically created single-reader channel (Django Channels)

2017-03-19 Thread Alexander Prokhorov
Dear Colleagues, I am playing with Channels for some time already. Now, I am trying to establish "sticky" channel to one of available workers. I thought I can create single-reader channel from consumer and somehow fix the routing to make this particular worker handle this single-reader channel

Re: Attach consumer to dynamically created single-reader channel (Django Channels)

2017-04-25 Thread Alexander Prokhorov
into Django; you'd > have to do your own ASGI worker class from scratch if you wanted that. > > Andrew > > On Sun, Mar 19, 2017 at 5:57 AM, Alexander Prokhorov > wrote: > >> Dear Colleagues, >> >> I am playing with Channels for some time already. >>