Ray, thanks for looking into the issue of delays and for outlining how the task-scheduling works.
2. Why wasn't the email I received from the CUNY Manifold Group, where the forum post was originated?
Laurie, it looks like you're subscribed to the Manifold group with level 'All Email'. Is that correct? Can you confirm that you receive other email notifications from this group?
The tool we built to allow crossposting, bp-multiple-forum-post, has a mechanism to prevent users from receiving multiple emails about the same item when it's crossposted to multiple groups. The logic looks like this.
1. A new activity item is posted to group A. At this time, the item should be immediately added to the queue of users who are subscribed in group A. The emails should go out in the next few seconds, via the functionality in BPGES (our email notification plugin) that sends email asynchronously.
2. Just after the activity item is posted in A, bp-multiple-forum-post schedules a task for the delayed creation of duplicate forum topics in groups B, C, etc. As we've seen, these topics may not be created for a few minutes. When they are created, BPGES should trigger the creation of emails for those items as well.
3. Whenever BPGES attempts to send a forum topic notification, bp-multiple-forum-post intercedes. It says: if the user has already received an email for this topic in the current batch of emails, skip it. This means that the user should only receive a single notification for a given topic in a batch.
If you're a member of groups A, B, and C, my reading of the code is that you ought to receive a notification from A, and that in some cases (depending on whether it's run as part of the same BPGES batch) you would also receive a notification from B, but not C. Laurie, it sounds to me like you never received the one from A. Is that correct?
I will note that this whole duplicate-prevention mechanism seems pretty iffy. It was built before BPGES moved to an asynchronous system for the actual sending of emails, and so it doesn't keep persistent information about which users have received which emails. It should probably be reworked so that BPGES doesn't insert the item into its internal queue if it detects that a user already has a queued notification for that activity item (it already enforces uniqueness per activity_id+group_id https://github.com/boonebgorges/buddypress-group-email-subscription/blob/1971a19d9efb4097d5ace1952c630f38abc58c7d/admin.php#L647). Because of the fact that the notification from A is queued during the same pageload as the original forum post, it should always take precedence over crossposted groups. I'll look into this for a future release.
In the meantime, I'm not really sure how all of this explains what Laurie is seeing. If you are a member of A and B, you should always receive a notification from A, regardless of what happens in B.