YaleSTC / reservations

Manage equipment loans & reservations. Who can borrow what, for how long?
yalestc.github.io/reservations
MIT License
139 stars 58 forks source link

Reminder e-mails not sending properly? #1739

Closed orenyk closed 5 years ago

orenyk commented 5 years ago

Note from client:

It looks like we’re having some email problems with Reservations, too. It looks like almost no Checkin Reminder emails have gone out since Thursday (Three were sent yesterday, so I assumed maybe the problem had cleared up, but I’m not seeing any for today).

We also have not received any Reservation Notes emails since Wednesday.

Overdue equipment reminder notices do seem to be going out fine.

Checkout receipts are being sent at the time equipment is checked out.

Overdue equipment fine messages appear to be sending when overdue equipment is returned.

I’m not sure about Missed Reservations notifications. We have 2 from yesterday and then nothing since Thursday. But, maybe we haven’t had any other missed reservations. They’re not an everyday occurrence.

Relevant logs from this morning (just the ones for the EmailCheckinReminderJob):

I, [2018-07-18T05:12:10.991553 #9896]  INFO -- : [ActiveJob] [DailyTasksJob] [daaa1ec5-5939-4fb8-92d1-1820585895ab] Enqueued EmailCheckinReminderJob (Job ID: e1ae6c54-5231-4ee5-b697-0d687bedb44c) to Async(default)
I, [2018-07-18T05:12:10.992445 #9896]  INFO -- : [ActiveJob] [EmailCheckinReminderJob] [e1ae6c54-5231-4ee5-b697-0d687bedb44c] Performing EmailCheckinReminderJob (Job ID: e1ae6c54-5231-4ee5-b697-0d687bedb44c) from Async(default)
D, [2018-07-18T05:12:11.001880 #9896] DEBUG -- : [ActiveJob] [EmailCheckinReminderJob] [e1ae6c54-5231-4ee5-b697-0d687bedb44c]   ESC[1mESC[35m (1.0ms)ESC[0m  ESC[1mESC[35mSET NAMES utf8,  @@SESSION.sql_mode = CONCAT(CONCAT(@@sql_mo
de, ',STRICT_ALL_TABLES'), ',NO_AUTO_VALUE_ON_ZERO'),  @@SESSION.sql_auto_is_null = 0, @@SESSION.wait_timeout = 2147483ESC[0m
D, [2018-07-18T05:12:11.006742 #9896] DEBUG -- : [ActiveJob] [EmailCheckinReminderJob] [e1ae6c54-5231-4ee5-b697-0d687bedb44c]   ESC[1mESC[36mAppConfig Load (4.0ms)ESC[0m  ESC[1mESC[34mSELECT  `app_configs`.* FROM `app_configs` ORD
ER BY `app_configs`.`id` ASC LIMIT 1ESC[0m
D, [2018-07-18T05:12:11.010797 #9896] DEBUG -- : [ActiveJob] [EmailCheckinReminderJob] [e1ae6c54-5231-4ee5-b697-0d687bedb44c]   ESC[1mESC[35m (0.7ms)ESC[0m  ESC[1mESC[34mSELECT COUNT(*) FROM `reservations` WHERE `reservations`.`du
e_date` = '2018-07-18' AND `reservations`.`status` = 3ESC[0m
I, [2018-07-18T05:12:11.011750 #9896]  INFO -- : [ActiveJob] [EmailCheckinReminderJob] [e1ae6c54-5231-4ee5-b697-0d687bedb44c] Found 17 due today reservations.
D, [2018-07-18T05:12:11.013113 #9896] DEBUG -- : [ActiveJob] [EmailCheckinReminderJob] [e1ae6c54-5231-4ee5-b697-0d687bedb44c]   ESC[1mESC[36mReservation Load (1.0ms)ESC[0m  ESC[1mESC[34mSELECT `reservations`.* FROM `reservations` 
WHERE `reservations`.`due_date` = '2018-07-18' AND `reservations`.`status` = 3 ORDER BY start_date, due_date, reserver_idESC[0m
I, [2018-07-18T05:12:11.038796 #9896]  INFO -- : [ActiveJob] [EmailCheckinReminderJob] [e1ae6c54-5231-4ee5-b697-0d687bedb44c] Sending reminder for due today reservation:
     #<Reservation id: 82465, reserver_id: 6867, checkout_handler_id: 1827, checkin_handler_id: nil, start_date: "2018-07-05", due_date: "2018-07-18", checked_out: "2018-07-05 18:38:21", checked_in: nil, created_at: "2018-07-03 17
:30:05", updated_at: "2018-07-05 18:38:21", equipment_model_id: 131, equipment_item_id: 557, notes: "### Reserved on July 03, 2018 13:30 by ...", notes_unsent: false, times_renewed: nil, status: "checked_out", overdue: 
false, flags: 1>
D, [2018-07-18T05:12:11.104960 #9896] DEBUG -- : [ActiveJob] [EmailCheckinReminderJob] [e1ae6c54-5231-4ee5-b697-0d687bedb44c]   ESC[1mESC[36mCACHE AppConfig Load (0.0ms)ESC[0m  ESC[1mESC[34mSELECT  `app_configs`.* FROM `app_configs` ORDER BY `app_configs`.`id` ASC LIMIT 1ESC[0m  [["LIMIT", 1]]
D, [2018-07-18T05:12:11.105636 #9896] DEBUG -- : [ActiveJob] [EmailCheckinReminderJob] [e1ae6c54-5231-4ee5-b697-0d687bedb44c]   ESC[1mESC[36mCACHE AppConfig Load (0.0ms)ESC[0m  ESC[1mESC[34mSELECT  `app_configs`.* FROM `app_configs` ORDER BY `app_configs`.`id` ASC LIMIT 1ESC[0m  [["LIMIT", 1]]
D, [2018-07-18T05:12:11.106323 #9896] DEBUG -- : [ActiveJob] [EmailCheckinReminderJob] [e1ae6c54-5231-4ee5-b697-0d687bedb44c]   ESC[1mESC[36mCACHE AppConfig Load (0.0ms)ESC[0m  ESC[1mESC[34mSELECT  `app_configs`.* FROM `app_configs` ORDER BY `app_configs`.`id` ASC LIMIT 1ESC[0m  [["LIMIT", 1]]
D, [2018-07-18T05:12:11.108229 #9896] DEBUG -- : [ActiveJob] [EmailCheckinReminderJob] [e1ae6c54-5231-4ee5-b697-0d687bedb44c]   ESC[1mESC[36mCACHE AppConfig Load (0.0ms)ESC[0m  ESC[1mESC[34mSELECT  `app_configs`.* FROM `app_configs` ORDER BY `app_configs`.`id` ASC LIMIT 1ESC[0m  [["LIMIT", 1]]
D, [2018-07-18T05:12:11.108784 #9896] DEBUG -- : [ActiveJob] [EmailCheckinReminderJob] [e1ae6c54-5231-4ee5-b697-0d687bedb44c]   ESC[1mESC[36mCACHE AppConfig Load (0.0ms)ESC[0m  ESC[1mESC[34mSELECT  `app_configs`.* FROM `app_configs` ORDER BY `app_configs`.`id` ASC LIMIT 1ESC[0m  [["LIMIT", 1]]
D, [2018-07-18T05:12:11.127701 #9896] DEBUG -- : [ActiveJob] [EmailCheckinReminderJob] [e1ae6c54-5231-4ee5-b697-0d687bedb44c] UserMailer#reservation_status_update: processed outbound mail in 20.0ms
I, [2018-07-18T05:12:11.128798 #9896]  INFO -- : [ActiveJob] [EmailCheckinReminderJob] [e1ae6c54-5231-4ee5-b697-0d687bedb44c] Performed EmailCheckinReminderJob (Job ID: e1ae6c54-5231-4ee5-b697-0d687bedb44c) from Async(default) in 133.8ms

It's claiming that there were 17 reservations that should have received reminders but there's only one email logged - based on the job definition it should log each one. This definitely needs to get sorted out quickly.