summaryrefslogtreecommitdiff
path: root/fml/lib/FML/Process
diff options
context:
space:
mode:
authorfukachan <fukachan>2006-05-04 05:19:37 +0000
committerfukachan <fukachan>2006-05-04 05:19:37 +0000
commitb9a0819494f2c312b8ed69f771aa2ccf1d92a486 (patch)
tree0fd6483f294c446d8e56ddfed09d27b13519af79 /fml/lib/FML/Process
parent26d286598b9ba2af7f09fa31a5d7e6efb0fa03ea (diff)
downloadfml8-b9a0819494f2c312b8ed69f771aa2ccf1d92a486.tar.gz
fml8-b9a0819494f2c312b8ed69f771aa2ccf1d92a486.tar.bz2
fml8-b9a0819494f2c312b8ed69f771aa2ccf1d92a486.zip
expire article under locked
Diffstat (limited to 'fml/lib/FML/Process')
-rw-r--r--fml/lib/FML/Process/Distribute.pm9
1 files changed, 8 insertions, 1 deletions
diff --git a/fml/lib/FML/Process/Distribute.pm b/fml/lib/FML/Process/Distribute.pm
index de711a92..274ddd72 100644
--- a/fml/lib/FML/Process/Distribute.pm
+++ b/fml/lib/FML/Process/Distribute.pm
@@ -3,7 +3,7 @@
# Copyright (C) 2000,2001,2002,2003,2004,2005,2006 Ken'ichi Fukamachi
# All rights reserved.
#
-# $FML: Distribute.pm,v 1.176 2006/04/11 12:31:43 fukachan Exp $
+# $FML: Distribute.pm,v 1.177 2006/05/03 07:42:37 fukachan Exp $
#
package FML::Process::Distribute;
@@ -826,12 +826,19 @@ sub _expire_article
{
my ($curproc) = @_;
+ # XXX_LOCK_CHANNEL: article_spool_modify
+ # exclusive lock for both sequence updating and spool writing
+ my $lock_channel = "article_spool_modify";
+
my $event_channel = "article_expire";
if ($curproc->is_event_timeout($event_channel)) {
$curproc->logdebug("try to expire articles");
+ $curproc->lock($lock_channel);
my $article = new FML::Article $curproc;
$article->expire();
+ $curproc->unlock($lock_channel);
+
$curproc->event_set_timeout($event_channel, time + 24*3600);
}
}