Closed (duplicate)
Project:
Notify
Version:
5.x-1.1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 Jan 2007 at 18:48 UTC
Updated:
24 Aug 2013 at 15:00 UTC
Due to timing issues, notify can send multiple notifications to the same user, if cron runs again while the first notification pass is going out. Modified the _cron hook as follows:
function notify_cron() {
if (variable_get('notify_lock', false)) {
watchdog('notify', 'Notify is still locked!');
} else {
variable_set('notify_lock', true);
if (time() - variable_get('notify_send_last', 0) > variable_get('notify_send', 86400)) {
_notify_send();
variable_set('notify_send_last', time());
}
variable_set('notify_lock', false);
}
}
Please add back to the main code.
Comments
Comment #1
RobRoy commentedCould you roll a patch? That would help. Thanks.
See http://drupal.org/patch.
Comment #2
beginner commentedhttp://drupal.org/node/138165 is a duplicate of this one.
what is puzzling is that with D5, the core cron function has been improved, to avoid having multiple instances of cron running, thereby duplicating the job.
If this bug really still existed in D5, more people would have reported it.
@mikegull : do you still experience this problem with D5?
@Shane: do you?
Comment #3
mlncn commentedAccording to issue at 180052, multiple notifications still can occur.
Comment #4
Rhino commentedI have multiple notifications on every cron run. Sometimes only two, sometimes as many as eight.
Comment #5
RobertNelsonVance commentedI too have been experiencing similar issues as described at http://drupal.org/node/180052#comment-1108742
Comment #6
jwatte commentedI think the logic is worse than that, unfortunately, and I think the proposed patch is just a band-aid.
I'm proposing a different patch.
Comment #7
gisleDuplicate of:
In principle, the fix should be backported to the 5.x-branch, but that is not going to happen.