Bug #19971
openExpected Group Forum Functionality
0%
Description
Hi All,
A user posted a message in a public group forum at 1:31pm:
https://commons.gc.cuny.edu/groups/cuny-manifold-users/forum/topic/upcoming-manifold-workshops-2/
It was cross-posted on several other groups, which posted at 2:03. Examples are below, both groups are also public
I received an email from the COIL forum at 2:37, see screenshot.
Two questions:
1. Robin (user) was wondering: Is this lag time between original posting, cross posting, and email typical and correct functionality? I thought maybe yes, since all messages have to be pulled through to each location, but wanted to be sure to ask.
2. Why wasn't the email I received from the CUNY Manifold Group, where the forum post was originated?
I received the email of the group forum post from the COIL group.This seems strange since both groups are public. I would think that a user would want the email to come from the forum where the post was originally shared.
Files
Related issues
Updated by Raymond Hoh 9 months ago
- Related to Support #17241: post not emailed added
Updated by Raymond Hoh 9 months ago
When a group crosspost is created, we add a scheduled task to create the new forum topics to the other groups. During this scheduled task, we create another scheduled task to post the activity items into the group feed. This change was made in #17241 to address issues with crossposted topics not being sent out via email.
So if there is a lag in the scheduled tasks system, there is a lag when group emails are scheduled to go out. (Also see #14276 about the scheduled tasks lag.) Right now, there is a lag of about 35 mins in the scheduled tasks queue, so that would explain the roughly 1 hour delay between the initial post in the forum and the group email sendout.
I'll look to clear out the scheduled tasks queue so the delay will be less noticeable.
Updated by Boone Gorges 9 months ago
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.
Updated by Boone Gorges 9 months ago
- Related to Feature #19980: Better duplicate-notification prevention for bp-multiple-forum-post added
Updated by Boone Gorges 9 months ago
Created #19980 to track the improvements to bp-multiple-forum-post.
Updated by Laurie Hurson 8 months ago
Yes, I have received other updates from the Mnaifold group that were not cross listed with other groups.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?
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.
Based on when it was posted in Manifold group and when i received, there is lag here, and maybe that explains some of the issue?
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?
That is correct.
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.
Yes, that was my sense, and why I was confused and wanted to raise here. I think the user should get the email from the group where the post originated, even if they receive it multiple times after that because of cross posting (though that is not ideal, and the current set up appears to try to tamp down on that)
Updated by Boone Gorges 8 months ago
Based on when it was posted in Manifold group and when i received, there is lag here, and maybe that explains some of the issue?
Yes, it could be, particularly if the BPGES asynch send routine kicked in after the bp-multiple-forum-post routine.
Updated by Raymond Hoh 8 months ago
Yes, it could be, particularly if the BPGES asynch send routine kicked in after the bp-multiple-forum-post routine.
This is indeed the case. If a crossposted forum topic is made, then the BPGES async send routine is kicked off after the second scheduled task when the activity item is created. See https://redmine.gc.cuny.edu/issues/17241#note-6 . In an ideal world with no scheduled task lag, the email should be sent out two minutes after the crossposted forum topic.
Updated by Laurie Hurson 8 months ago
- File Screenshot 1 forum post .png Screenshot 1 forum post .png added
- File Screenshot 2 email .png Screenshot 2 email .png added
Hi All,
Just reporting another instance of delayed send on forum post, and email coming from a cross-posted group not the original...
I posted this announcement in the TLC forum (public group) at 10:45a: https://commons.gc.cuny.edu/groups/teaching-and-learning-center/forum/topic/oer-student-showcase-this-wednesday-12pm/#post-165451
It was cross posted on several other groups, see screenshot.
I received the email at 11:25a from another group "Centers for Teaching and Learning (CTL's)", see screenshot 2.
Updated by Raymond Hoh 8 months ago
- Related to Bug #20088: Prevent PDF Embedder from using Action Scheduler added
Updated by Raymond Hoh 8 months ago
Hi Laurie,
Thanks for the update. The email delay is caused by a backlog in our scheduled tasks system. Some of this can be attributed to a plugin update we made to the PDF Embedder plugin last week (see #20088).