Browse Source

fix interval count

blezz-tech 1 tháng trước cách đây
mục cha
commit
0b5a76e70b
1 tập tin đã thay đổi với 9 bổ sung6 xóa
  1. 9 6
      handlers/handlers/open_access_request_pending.py

+ 9 - 6
handlers/handlers/open_access_request_pending.py

@@ -67,6 +67,9 @@ def start_handler():
                 else:
                     processing(ticket)
             tickets = filter_interval_tickets(tickets)
+        
+        logging.debug(tickets)
+        logging.debug("Sleep")
         sleep(INTERVAL_TIME)
 
 
@@ -95,12 +98,12 @@ def processing(ticket):
 
 def get_fake_data() -> List[Ticket]:
     return [
-        Ticket(0, "t", 0,0,0,0,0,0,0,0,0,"note"),
-        Ticket(1, "t", 0,1,0,0,0,0,0,0,0,"note"),
-        Ticket(2, "t", 0,2,0,0,0,0,0,0,0,"note"),
-        Ticket(3, "t", 0,3,0,0,0,0,0,0,0,"note"),
-        Ticket(4, "t", 0,4,0,0,0,0,0,0,0,"note"),
-        Ticket(5, "t", 0,5,0,0,0,0,0,0,0,"note"),
+        Ticket(0, "t", 0,0,0,0,0,0,0,0,0,"note",INTERVAL_COUNT - 2),
+        Ticket(1, "t", 0,1,0,0,0,0,0,0,0,"note",INTERVAL_COUNT + 1),
+        Ticket(2, "t", 0,2,0,0,0,0,0,0,0,"note",INTERVAL_COUNT - 1),
+        Ticket(3, "t", 0,3,0,0,0,0,0,0,0,"note",INTERVAL_COUNT + 2),
+        Ticket(4, "t", 0,4,0,0,0,0,0,0,0,"note",INTERVAL_COUNT + 1),
+        Ticket(5, "t", 0,5,0,0,0,0,0,0,0,"note",INTERVAL_COUNT - 1),
     ]
 
 # def get_token():