Sfoglia il codice sorgente

Fixed empty catch order

Gamaliel Espinoza Macedo 6 anni fa
parent
commit
9a16f1d392
1 ha cambiato i file con 3 aggiunte e 3 eliminazioni
  1. 3 3
      ondemand/service.py

+ 3 - 3
ondemand/service.py

@@ -159,6 +159,9 @@ def process_queue_with_threads():
                     threads[index] = thread
                     thread.start()
 
+                except Empty:
+                    is_drained = True
+
                 except Exception as err:
                     log.error('[process_queue_with_threads] [{}] {}'.format(
                         station,
@@ -166,9 +169,6 @@ def process_queue_with_threads():
                     ))
                     continue
 
-                except Empty:
-                    is_drained = True
-
             elif not t.is_alive():
                 threads[index] = None