blezz-tech 1 сар өмнө
parent
commit
b213db8d00

+ 2 - 4
handlers/handlers/open_access_request_pending.py

@@ -59,9 +59,7 @@ def start_handler():
     tickets = get_fake_data()
 
     while(True):
-        if tickets == []:
-            sleep(INTERVAL_TIME)
-        else:
+        if tickets:
             for ticket in tickets:
                 ticket.interval_count -= 1
                 if ticket.interval_count <= 0:
@@ -69,7 +67,7 @@ def start_handler():
                 else:
                     processing(ticket)
             tickets = filter_interval_tickets(tickets)
-            sleep(INTERVAL_TIME)
+        sleep(INTERVAL_TIME)
 
 
 # START CUSTOM FUNCTIONS