It appears that this module currently sends notifications immediately. If there's a lot of subscriptions on a given node or taxonomy type, this can result in a very lengthy delay. Instead, perhaps subscriptions could be queued up, and mailed out when _cron runs.

CommentFileSizeAuthor
#7 mailqueue.zip2.32 KBmindless

Comments

TDobes’s picture

Yes -- this is a problem. From the README:

Because this module causes the post insert\update to pause while all subscribers
are e-mailed, it may not be practical for some large sites.

Dan had planned on fixing this by creating a separate module (mailqueue) which would send e-mails during cron runs... I don't know what the current status of this is.

Take a look at the (currently commented out) code for subscriptions_settings and search through the module for variable_get('subscriptions_event', 'insert') -- it appears that the subscriptions.module code to do this is already in place; we're just waiting on mailqueue.

Maybe there's already another contrib module that performs the job that mailqueue was planned for? If so, we could plug it in and get this working.

moshe weitzman’s picture

i believe massmailer.module is built to process this sort of mail queue. would be great to get these 2 modules working together.

dmclark’s picture

Version: » 4.6.x-1.x-dev

any update on this?

tigrezno’s picture

Try adding anti-spam to subscription!

zilla’s picture

isn't the use of cron for updates on subscriptions one of the most serious issues preventing widespread use of this module? if it goes to core without that admin capability then it will die on the vine - even a solid site can witness a one minute delay when posting a forum comment or reply with this module enabled (hence it has been replaced in my own efforts with 'notify' - which is actually quite nice and gets everything for everybody...)

i also understand that this is in the SoC project list - but does that mean that it is off of this list or out of main developer interests? i'm a bit confused about how the SoC folks take over projects that were already in development versus some of the ground up stuff...

TDobes’s picture

Yes, this is an important feature that needs attention before the module can be used for exceptionally large sites. I would prefer to offload this sort of functionality to an external module, which would queue mails then send them during cron runs rather than placing this within the subscriptions module itself.

As for the SoC involvement with this project, I have heard absolutely nothing from the SoC participants. I see there was a CVS commit of some work recently (I assume by one of them), but I haven't yet had a chance to look into it. I heard they were doing further development of RobertDouglass' version of the module, although I am not sure whether this is true or not.

mindless’s picture

StatusFileSize
new2.32 KB

I've attached a very simple mailqueue.module to work with subscriptions and send the emails during cron processing. Also included is a small patch for subscriptions.module to uncomment the selector for immediate vs queued emails and update the mailqueue_insert parameters to work with my module. We're using this now on http://gallery.menalto.com/

dziemecki’s picture

Assigned: Unassigned » dziemecki

This needs to be done, and I'm working on an implementation. This one shouldn't require any external apps. Hope to have something out within a week or two.

dziemecki’s picture

I've got a working prototype of this running on my site. It's a faily significant change in the code base, though. If any of you are willing to help testing this, please ping me "http://drupal.org/user/4532/contact". Thx.

dziemecki’s picture

Status: Active » Fixed

The cron-mailing code has been committed.

dziemecki’s picture

Status: Fixed » Closed (fixed)

No complaints for fix. Closing.