playmak3r commited on
Commit
3090328
1 Parent(s): 32b35a3

fix: add sleep time for the infinite loop

Browse files
Files changed (1) hide show
  1. server/app.py +3 -2
server/app.py CHANGED
@@ -20,7 +20,7 @@ def queue_process():
20
  else: break
21
 
22
  if len(task_list): task_process(task_list)
23
-
24
 
25
  def task_process(input_text_list: List[str]):
26
  sugoiTranslator = SugoiTranslator()
@@ -71,6 +71,7 @@ if __name__ == '__main__':
71
  Thread(target=queue_process, daemon=True).start()
72
  print("Starting server...")
73
  try: serve(app, port= 7860)
74
- except: serve(app, port= 7860)
 
75
 
76
 
 
20
  else: break
21
 
22
  if len(task_list): task_process(task_list)
23
+ time.sleep(0.5)
24
 
25
  def task_process(input_text_list: List[str]):
26
  sugoiTranslator = SugoiTranslator()
 
71
  Thread(target=queue_process, daemon=True).start()
72
  print("Starting server...")
73
  try: serve(app, port= 7860)
74
+ except BaseException as e:
75
+ print(e)
76
 
77