Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6de6ee1

Browse files
committed
Fix eventloop stuck in docker-based tests.aio-libs/aiopg#375
1 parente7196a9 commit6de6ee1

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

‎contrib/mmts/tests2/lib/bank_client.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ def status(self):
159159
serialized_aggs[conn_id][aggname]=agg.as_dict()
160160
agg.clear_values()
161161

162-
self.child_pipe.send(serialized_aggs)
162+
yieldfromself.child_pipe.coro_send(serialized_aggs)
163163
else:
164164
print('evloop: unknown message')
165165

@@ -185,7 +185,11 @@ def exec_tx(self, tx_block, aggname_prefix, conn_i):
185185
print('Connected %s, %d'% (aggname_prefix,conn_i+1) )
186186

187187
if (notcur)orcur.closed:
188-
cur=yieldfromconn.cursor(timeout=10)
188+
# big timeout here is important because on timeout
189+
# expiration psycopg tries to call PQcancel() which
190+
# tries to create blocking connection to postgres and
191+
# blocks evloop
192+
cur=yieldfromconn.cursor(timeout=3600)
189193

190194
# ROLLBACK tx after previous exception.
191195
# Doing this here instead of except handler to stay inside try

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp