- Issue created by @chrisolof
- πΊπΈUnited States chrisolof
Interestingly it seems there is some skipping and cleanup logic already in this submodule.
The solution cronSchedule seems to take currently (when the referenced webform submission is missing) is to delete the orphaned record from webform_scheduled_email and move on. Cleaning up the orphaned (and unusable) record upon discovery seems better than logging and requiring a site admin to manually clean up the table someday. As such, I'm updating the proposed resolution.
- Merge request !595Remove orphaned webform_scheduled_email records in cron methods β (Open) created by chrisolof
- πΊπΈUnited States chrisolof
MR 595 removes orphaned webform_scheduled_email records when encountered in cron methods instead of trying to proceed with them and causing PluginNotFoundExceptions. This is ready for review.
- π¨π¦Canada Liam Morland Ontario, CA π¨π¦
This makes sense to me. Can you add a test?
- πΊπΈUnited States chrisolof
Thanks Liam. Test coverage added, covering the clean-up of webform_scheduled_email records with missing a plugin or a missing submission, both in schedule and send state (to ensure cleanup is working in cronSchedule() and cronSend()).
While I was in there I found some disabled test code that seemed disabled due to this orphaned record issue, so I moved, updated, and enabled that check also.