Yaron Koresh commited on
Commit
47de9f0
·
verified ·
1 Parent(s): cc34cb2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -250,7 +250,7 @@ def parallel(*pairs):
250
 
251
  with LaunchAsync(async_main) as queue:
252
  for pair in pairs:
253
- f = pair.pop()
254
  queue.put(Command(f, pair))
255
  response = queue.get()
256
  return response
@@ -362,9 +362,7 @@ def handle(*inp):
362
 
363
  ln = len(result)
364
 
365
- def _calc():
366
- return calc()
367
- parargs = [[_calc,*inp] for i in range(ln)]
368
  out_pipe = parallel(parargs)
369
  for i in range(ln):
370
  name = generate_random_string(12)+".png"
 
250
 
251
  with LaunchAsync(async_main) as queue:
252
  for pair in pairs:
253
+ f = pair.pop(0)
254
  queue.put(Command(f, pair))
255
  response = queue.get()
256
  return response
 
362
 
363
  ln = len(result)
364
 
365
+ parargs = [[calc,*inp] for i in range(ln)]
 
 
366
  out_pipe = parallel(parargs)
367
  for i in range(ln):
368
  name = generate_random_string(12)+".png"