|
@@ -42,6 +42,8 @@ def send_reminder_notification(ticket):
|
|
|
print(f"Отправлено напоминание пользователю {user} о тикете {ticket.id}")
|
|
|
|
|
|
def send_wontfix_notification(ticket):
|
|
|
+ jsreq.requestPatchTicketUser(token, config.API_URL+f"tickets/api/tickets/{ticket.id}", 149)
|
|
|
+
|
|
|
user = "TEST_USER"
|
|
|
|
|
|
message = f"Уведомление: тикет {ticket.id} был отмечен как WONTFIX из-за отсутствия действий"
|
|
@@ -52,8 +54,6 @@ def send_wontfix_notification(ticket):
|
|
|
|
|
|
print(f"Отправлено уведомление пользователю {user} о WONTFIX для тикета {ticket.id}")
|
|
|
|
|
|
-
|
|
|
-
|
|
|
def ticket_worker(ticket, start_time):
|
|
|
if ticket.status == 131:
|
|
|
print(tickets_nt)
|
|
@@ -69,13 +69,12 @@ def ticket_worker(ticket, start_time):
|
|
|
tickets_nt[ticket.id]["reminders"] += 1
|
|
|
tickets_nt[ticket.id]["last_date_reminder"] = start_time
|
|
|
|
|
|
- if IS_INFINITE_REMINDER or tickets_nt[ticket.id]['reminders'] < MAX_REMINDERS:
|
|
|
+ if IS_INFINITE_REMINDER or tickets_nt[ticket.id]['reminders'] <= MAX_REMINDERS:
|
|
|
send_reminder_notification(ticket)
|
|
|
else:
|
|
|
del tickets_nt[ticket.id]
|
|
|
send_wontfix_notification(ticket)
|
|
|
|
|
|
-
|
|
|
def ticket_list_worker(ticket_list, start_time):
|
|
|
tickets=jsreq.requestGetTicket_user(token, config.API_URL+f"tickets/api/ticket_list/{ticket_list.id}")
|
|
|
for ticket in tickets:
|