-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# What it does This PR fixes an issue that we've seen in production where an ActiveJob instance fails to deserialize due to an Appointment not being found with a certain ID. I looked through the code, and I think the likely cause of the issue is that in some cases we merge multiple appointments that have been scheduled for the same time slot together, but we were still enqueuing a confirmation email for an Appointment that didn't exist after this merge was performed. The errors we're seeing in production look like this: ``` Error while trying to deserialize arguments: Couldn't find Appointment with 'id'=11238 ``` # Why it is important Some members weren't getting confirmation emails, and it's nice to not have recurring errors due to bugs. # Implementation notes * I added a couple tests for appointment scheduling in the process of reproducing the bug. * I refactored the code that handled merges a bit to consolidate that logic in one place. * This change does mean we'll be sending out more emails for appointments than we previously were. We're now sending one for every appointment change, which might be noisy for members. But it seems good for them to always have the latest info in their email, so let's try this and see how it goes. # Your bandwidth for additional changes to this PR _Please choose one of the following to help the project maintainers provide the appropriate level of support:_ - [x] I have the time and interest to make additional changes to this PR based on feedback. - [ ] I am interested in feedback but don't need to make the changes myself. - [ ] I don't have time or interest in making additional changes to this work. - [ ] Other or not sure (please describe):
- Loading branch information
Showing
4 changed files
with
73 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters