hat command line, since you're already
> passing the UNIX socket, I don't remember why it's there.
>
> I suggest you remove fd=0 and see if that then works with multiple
> processes.
>
> Andrew
>
> On Mon, Nov 26, 2018 at 3:10 PM Zhiyu (Drew) Li > wrote:
>
>
Hi there,
I am trying to migrate a tornado project to django channel2. I have moved
all essential parts and wired them up in channel. It runs OK in development
mode, but in production it seems the multi-daphne worker configuration is
causing strange errors.
AttributeError: '_UnixSelectorEventLoop'
Hi there,
I was trying to write a test for a consumer. It is just a very simply
AsyncHttpConsumer subclass that awaits on asyncio.sleep(3) and returns a
"OK" in plain text.
The test case is:
@pytest.mark.asyncio
async def test_my_consumer():
communicator = HttpCommunicator(BasicHttpConsumer,
n Wednesday, November 7, 2018 at 8:56:52 PM UTC-7, Andrew Godwin wrote:
>
> Channels doesn't take over at all unless you configure an async consumer.
> To make sure it's working I'd recommend writing a single async consumer,
> and running a test against that to ensur
Hi there,
I am trying to migrate an existing Django project to Channels2. We want to
keep all existing sync codes unchanged and we will continue mode of the
development in sync mode. But having Channels opens the opportunity to
develop some features in async mode.
I was able to install channels2
Hi there,
I got the following 2 questions
There is only one thread (MainThread) and one event loop running on it by
default if all existing consumers are asynchronous consumers?
Regular sync views (if any) are handled by Threadpoolexecutor and run in a
sub Thread. These sync views won't block th
Andrew Godwin wrote:
> Yup, that's the right way - subclass the async consumer class and then
> write a handle method. You have to do your own post/get distinctions, like
> in a Django view, but with the scope rather than the request.
>
> Andrew
>
> On Mon, Oct 29, 2018
Not sure if this is the best way. I just found
inside AsyncHttpConsumer.handle() I can access self.scope['method'] to
determine if it is a GET or POST or others.
Thanks
Drew
On Monday, October 29, 2018 at 3:50:43 PM UTC-6, Zhiyu/Drew Li wrote:
>
> Hi there,
>
> New
Hi there,
Newbie to Channels.
I am trying to write a Async consumer to handle a http GET request
How to write a subclass MyAsynHttpConsumer(AsyncHttpConsumer) for this
purpose? Or I am looking at the wrong class?
Also if I understand correctly, I should manually add a new pair 'http':
MyAsynHttp
turns a further object to act inside the scope.
>
> Andrew
>
> On Fri, Oct 26, 2018 at 2:55 PM Zhiyu/Drew Li wrote:
>
>> Hi,
>>
>> Newbie here. (please bear with me if this a stupid question)
>>
>> I am going through the tutorial and doc and got this ques
Hi,
Newbie here. (please bear with me if this a stupid question)
I am going through the tutorial and doc and got this question regarding how
ProtocolTypeRouter works.
ProtocolTypeRouter.__init__ takes a dict "application_mapping" and append a
key-value pair to it: "http': class AsgiHandler
As
11 matches
Mail list logo