Adding in some testing quote checks and logging"
"
This commit is contained in:
parent
eea4853a0f
commit
b44cbb68d9
|
|
@ -292,7 +292,9 @@ func (h *QuotesHandler) DailyQuoteExpirationCheck() {
|
||||||
fmt.Println("Running DailyQuoteExpirationCheck...")
|
fmt.Println("Running DailyQuoteExpirationCheck...")
|
||||||
|
|
||||||
reminderJobs := []quoteReminderJob{
|
reminderJobs := []quoteReminderJob{
|
||||||
|
{5, FirstReminder, "Reminder: Quote %s Expires Soon", "first_reminder.html"}, // FOR TESTING
|
||||||
{7, FirstReminder, "Reminder: Quote %s Expires Soon", "first_reminder.html"},
|
{7, FirstReminder, "Reminder: Quote %s Expires Soon", "first_reminder.html"},
|
||||||
|
{-3, SecondReminder, "Follow-Up: Quote %s Expired", "second_reminder.html"}, // FOR TESTING
|
||||||
{-7, SecondReminder, "Follow-Up: Quote %s Expired", "second_reminder.html"},
|
{-7, SecondReminder, "Follow-Up: Quote %s Expired", "second_reminder.html"},
|
||||||
{-60, ThirdReminder, "Final Reminder: Quote %s Closed", "final_reminder.html"},
|
{-60, ThirdReminder, "Final Reminder: Quote %s Closed", "final_reminder.html"},
|
||||||
}
|
}
|
||||||
|
|
@ -303,6 +305,11 @@ func (h *QuotesHandler) DailyQuoteExpirationCheck() {
|
||||||
fmt.Printf("Error getting quotes for day offset %d: %v\n", job.DayOffset, err)
|
fmt.Printf("Error getting quotes for day offset %d: %v\n", job.DayOffset, err)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if len(quotes) == 0 {
|
||||||
|
fmt.Printf("No %s emails to send for day offset %d.\n", job.ReminderType.String(), job.DayOffset)
|
||||||
|
continue
|
||||||
|
}
|
||||||
for _, q := range quotes {
|
for _, q := range quotes {
|
||||||
// Format dates as DD/MM/YYYY
|
// Format dates as DD/MM/YYYY
|
||||||
var submissionDate, expiryDate string
|
var submissionDate, expiryDate string
|
||||||
|
|
|
||||||
BIN
go-app/server
BIN
go-app/server
Binary file not shown.
Loading…
Reference in a new issue