2 Ревизии 1ccc25b53c ... 4bd495e1d7

Автор SHA1 Съобщение Дата
  blezz-tech 4bd495e1d7 reminder for tickets with status IN_PROCESS преди 2 седмици
  blezz-tech 1ccc25b53c reminder for tickets with status IN_PROCESS преди 2 седмици
променени са 1 файла, в които са добавени 8 реда и са изтрити 8 реда
  1. 8 8
      handlers/st_request_in_process.py

+ 8 - 8
handlers/st_request_in_process.py

@@ -56,15 +56,15 @@ def process_in_progress_ticket(ticket_list, start_time):
                     "last_date_reminder": start_time
                 }
             
-            if IS_INFINITE_REMINDER or tickets[ticket.id]['reminders'] < MAX_REMINDERS:
-                if (start_time - tickets[ticket.id]["last_date_reminder"]) > DEFAULT_REMINDER_INTERVAL:
+            if (start_time - tickets[ticket.id]["last_date_reminder"]) > DEFAULT_REMINDER_INTERVAL:
+                if IS_INFINITE_REMINDER or tickets[ticket.id]['reminders'] < MAX_REMINDERS:
                     send_reminder("st_request_in_process@ej.sharix-app.org", ticket)
-
-                    tickets[ticket.id]["reminders"] += 1
-                    tickets[ticket.id]["last_date_reminder"] += start_time
-            elif not IS_INFINITE_REMINDER and tickets[ticket.id]['reminders'] >= MAX_REMINDERS:
-                del tickets[ticket.id] 
-                # Функция смены статуса на WONTFIX
+                else:
+                    del tickets[ticket.id] 
+                    # Функция смены статуса на WONTFIX
+                
+                tickets[ticket.id]["reminders"] += 1
+                tickets[ticket.id]["last_date_reminder"] += start_time
 
 
 def status_changer():