Re: Problem with psycopg2 and asyncio
От | Frank Millman |
---|---|
Тема | Re: Problem with psycopg2 and asyncio |
Дата | |
Msg-id | D97F59D714E849A2AC336173CE85CE99@FrankLaptop обсуждение исходный текст |
Ответ на | Re: Problem with psycopg2 and asyncio (Daniele Varrazzo <daniele.varrazzo@gmail.com>) |
Ответы |
Re: Problem with psycopg2 and asyncio
|
Список | psycopg |
On 29/02/16 18:07, Daniele Varrazzo wrote:
>
> On Mon, Feb 29, 2016 at 2:52 PM, Frank Millman <frank@chagford.com> wrote:
>
> > Of course I may just be doing something silly, in which case I would be
> > delighted if someone pointed it out.
>
> Are you running psycopg in async mode or in green mode?
>
>
> > Of course I may just be doing something silly, in which case I would be
> > delighted if someone pointed it out.
>
> Are you running psycopg in async mode or in green mode?
>
To be honest, I don’t know what that means, so I am probably running in green mode.
I am aware that psycopg2 has some extensions that enable asynchronous communication, but I am not using any of those.
To repeat what I replied to Michael,
I still think that my theory holds water. Run the database in its own thread, pass requests to it using a queue.Queue(), and pass results back using an asyncio.Queue(). It works brilliantly for the other two databases, and I cannot see any reason why it should not work with psycopg2.Frank
В списке psycopg по дате отправления: