The attached patch implements batching/throttling support for Notify.
Many of us run sites on shared servers with an outgoing message limit. The current version of notify sends all of its notifications out at once, with no support for batching them, so at a certain point the module will run afoul of the outgoing message limit. I developed this because I ran into the limit on one of my servers. It is currently in service on that production box and is working well there.
This patch changes the database; instead of using notify_send_last as a drupal variable, that information is stored on each row in the notify table. That way, a proper query can be done and only part of the table notified at a time. There is an addition to the settings page to specify how many should be sent on each cron run; the default is 5000 (or essentially unlimited). It's up to you to set up the combination of your cron schedule and the value you choose here to make sure you don't hit your host's outgoing message limit.
The database update is required before the updated version can work correctly. For that reason, sending is disabled until the update.php is run.
If you have any questions or would like anyting finessed in this patch, I'll be happy to help out.
Thanks,
-Randy
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | Update Error.JPG | 117.19 KB | newdru08 |
| notify_batching.patch | 6.02 KB | rfay |
Comments
Comment #1
beginner commentedSee:
http://drupal.org/node/159427
http://drupal.org/project/issues?projects=3270&categories=bug&states=1,8...
Comment #2
newdru08 commentedHi,
Many thanks for the patch- exactly what Im looking for. But unfortunately the patch doesnt work for 5.x1xDev as function notify_update_3() already exists in notify.install - so i'm getting a db error when running update.php
Can you please please please re-roll this patch against the latest 5.x1xdev
Many Thanks in advance
Comment #3
rfayHi newdru08 -
I think your problem with the patch may be that you applied it twice. I applied it successfully against 5.x-1.x-dev (Sept 3 2008) and it applied fine. But the originals of neither the 1.x nor the 2.x have a notify_update_3 in the original.
it's a long time since this patch was done, however, and since it never made it into the code, it may or may not work.
Good luck,
-Randy
Comment #4
newdru08 commentedThanks Randy,
I was patching the wrong version (the extended notify module from http://www.speedtech.it/drupal-notify-module
The patch went in easily, but on running the update.php, I get an error message (see attached screenshot)
Looking forward to your support.
Ta
Comment #5
matt2000 commentedTry to consolidate into #365700: Need to queue mailings across multiple cron runs for scalability