2 次代碼提交 31af320388 ... 7100af483b

作者 SHA1 備註 提交日期
  blezz-tech 7100af483b reminder for tickets with status IN_PROCESS 2 周之前
  blezz-tech 31af320388 reminder for tickets with status IN_PROCESS 2 周之前
共有 1 個文件被更改,包括 16 次插入15 次删除
  1. 16 15
      handlers/st_request_in_process.py

+ 16 - 15
handlers/st_request_in_process.py

@@ -49,21 +49,22 @@ def send_wontfix_notification(user, ticket):
 def process_in_progress_ticket(ticket, start_time):
     tickets_new=jsreq.requestGetTicket_user(token, config.API_URL+f"tickets/api/ticket_list/{ticket.id}")
     for ticket_new in tickets_new:
-        if ticket_new.id in tickets:
-            tickets[ticket_new.id] = {
-                "reminders": 0,
-                "last_date_reminder": start_time
-            }
-        
-        if IS_INFINITE_REMINDER or tickets[ticket_new.id]['reminders'] < MAX_REMINDERS:
-            if (start_time - tickets[ticket_new.id]["last_date_reminder"]) > DEFAULT_REMINDER_INTERVAL:
-                send_reminder("st_request_in_process@ej.sharix-app.org", ticket_new)
-
-                tickets[ticket_new.id]["reminders"] += 1
-                tickets[ticket_new.id]["last_date_reminder"] += start_time
-        elif not IS_INFINITE_REMINDER and tickets[ticket_new.id]['reminders'] >= MAX_REMINDERS:
-            del tickets[ticket_new.id] 
-            # Функция смены статуса на WONTFIX
+        if ticket_new.status == 131:
+            if ticket_new.id in tickets:
+                tickets[ticket_new.id] = {
+                    "reminders": 0,
+                    "last_date_reminder": start_time
+                }
+            
+            if IS_INFINITE_REMINDER or tickets[ticket_new.id]['reminders'] < MAX_REMINDERS:
+                if (start_time - tickets[ticket_new.id]["last_date_reminder"]) > DEFAULT_REMINDER_INTERVAL:
+                    send_reminder("st_request_in_process@ej.sharix-app.org", ticket_new)
+
+                    tickets[ticket_new.id]["reminders"] += 1
+                    tickets[ticket_new.id]["last_date_reminder"] += start_time
+            elif not IS_INFINITE_REMINDER and tickets[ticket_new.id]['reminders'] >= MAX_REMINDERS:
+                del tickets[ticket_new.id] 
+                # Функция смены статуса на WONTFIX
 
 
 def status_changer():