Closed (fixed)
Project:
Digest
Version:
1.0.x-dev
Component:
Code
Priority:
Major
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
6 Aug 2020 at 22:28 UTC
Updated:
4 Sep 2020 at 23:29 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
derekcresswell commentedComment #3
derekcresswell commentedComment #4
derekcresswell commentedHere is a first pass at the implementation of this.
hook_mailroutes to theprepareMailfunction of the digest manager. This formats the email for sending.The Digest entity gained the
sendmethod which renders and sends the digest to a given user.The queue worker had the
processItemmethod filled out. To skip faulty digests, I couldn't use the suspend queue exception because multiple types of digests can be in a single queue worker. Instead it keeps track of the unsendable digests.An install file was added to set up the default email for digests to use.
The settings form was modified to use different names for the config.
With the current patch, I walked through a brand new site, created a digest, subscribed to it with a user, and had it successfully send at the scheduled time then set the next send date to the correct time. No extra emails were sent on subsequent cron runs.
Because of this, I feel after this is resolved, we could create an alpha/beta release for some preliminary tests.
Comment #5
travis-bradbury commentedLooks good to me. I have one minor complaint:
You can pass the original exception as the
$previousparameter innew \Exception. It'll provide more context. As-is, that \Exception would only be traced back to this line, but with $previous set one could access the stack trace for the EntityMalformedException too.Comment #7
derekcresswell commentedRighto! Added the exception to the trace and committed.