mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-29 04:50:21 +00:00
Merge pull request #75 from jjohnson42/reworkworkers
Add a recourse to drain queue
This commit is contained in:
commit
0e5ac5c683
@ -290,6 +290,15 @@ def perform_requests(operator, nodes, element, cfg, inputdata):
|
||||
for t in list(livingthreads):
|
||||
if t.dead:
|
||||
livingthreads.discard(t)
|
||||
try:
|
||||
# drain queue if a thread put something on the queue and died
|
||||
while True:
|
||||
datum = resultdata.get_nowait()
|
||||
if datum != 'Done':
|
||||
yield datum
|
||||
except queue.Empty:
|
||||
pass
|
||||
|
||||
|
||||
|
||||
def perform_request(operator, node, element,
|
||||
|
Loading…
Reference in New Issue
Block a user