summaryrefslogtreecommitdiff
path: root/lib/exe/indexer.php
diff options
context:
space:
mode:
authorAdrian Lang <lang@cosmocode.de>2010-05-04 12:07:35 +0200
committerAdrian Lang <lang@cosmocode.de>2010-05-05 12:23:45 +0200
commit3e0c7aa328ac721b3bcf17822f9ed3659ad93d14 (patch)
tree725d6ccf7970a7c03ce4685f68d6d500915c4a96 /lib/exe/indexer.php
parent6b8f02cfe58b224607e5479f8469dde16c3169ac (diff)
downloadrpg-3e0c7aa328ac721b3bcf17822f9ed3659ad93d14.tar.gz
rpg-3e0c7aa328ac721b3bcf17822f9ed3659ad93d14.tar.bz2
Add locking for indexer-based notifications
Diffstat (limited to 'lib/exe/indexer.php')
-rw-r--r--lib/exe/indexer.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/exe/indexer.php b/lib/exe/indexer.php
index eb5670005..7e55915f4 100644
--- a/lib/exe/indexer.php
+++ b/lib/exe/indexer.php
@@ -353,6 +353,9 @@ function sendDigest() {
$olduser = $_SERVER['REMOTE_USER'];
foreach($subscriptions as $id => $users) {
+ if (!subscription_lock($id)) {
+ continue;
+ }
foreach($users as $data) {
list($user, $style, $lastupdate) = $data;
$lastupdate = (int) $lastupdate;
@@ -399,6 +402,7 @@ function sendDigest() {
// Update notification time.
subscription_set($user, $id, $style, time(), true);
}
+ subscription_unlock($id);
}
// restore current user info