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

Commita0fd98b

Browse files
committed
some debug info in client2
1 parenta4806e5 commita0fd98b

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

‎tests2/client2.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,15 @@ def status(self):
7272
whileself.running:
7373
msg=yieldfromself.child_pipe.coro_recv()
7474
ifmsg=='status':
75+
print('evloop: got status request')
7576
serialized_aggs= {}
7677
forname,aggregateinself.aggregates.items():
7778
serialized_aggs[name]=aggregate.as_dict()
7879
aggregate.clear_values()
7980
self.child_pipe.send(serialized_aggs)
81+
print('evloop: sent status response')
82+
else:
83+
print('evloop: unknown message')
8084

8185

8286
@asyncio.coroutine
@@ -94,6 +98,7 @@ def exec_tx(self, tx_block, aggname_prefix, conn_i):
9498
agg.finish_tx('commit')
9599
exceptpsycopg2.Errorase:
96100
agg.finish_tx(e.pgerror)
101+
print("We've count to infinity!")
97102

98103
@asyncio.coroutine
99104
deftransfer_tx(self,conn,cur):
@@ -117,6 +122,7 @@ def total_tx(self, conn, cur):
117122
yieldfromcur.execute('select sum(amount) from bank_test')
118123
total=yieldfromcur.fetchone()
119124
iftotal[0]!=0:
125+
print('Isolation error, totel = ',total[0])
120126
self.isolation+=1
121127

122128
defrun(self):
@@ -138,8 +144,12 @@ def bgrun(self):
138144
self.evloop_process.start()
139145

140146
defget_status(self):
147+
print('test: sending status request')
141148
self.parent_pipe.send('status')
142-
returnself.parent_pipe.recv()
149+
print('test: awaitng status response')
150+
resp=self.parent_pipe.recv()
151+
print('test: got status response')
152+
returnresp
143153

144154
defstop(self):
145155
self.running=False

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp