diff options
| author | fukachan <fukachan> | 2006-04-04 13:00:33 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2006-04-04 13:00:33 +0000 |
| commit | e5fe5e4693ba7ed7ef95bb111a6c065976487bdf (patch) | |
| tree | bb697b1d018adf5e1cec75e47b19282346855334 /fml/lib/FML/Process/QueueManager.pm | |
| parent | da166688602edb8fe1c1b0fe31054050b1c52b84 (diff) | |
| download | fml8-e5fe5e4693ba7ed7ef95bb111a6c065976487bdf.tar.gz fml8-e5fe5e4693ba7ed7ef95bb111a6c065976487bdf.tar.bz2 fml8-e5fe5e4693ba7ed7ef95bb111a6c065976487bdf.zip | |
queue validation logic modified.
Diffstat (limited to 'fml/lib/FML/Process/QueueManager.pm')
| -rw-r--r-- | fml/lib/FML/Process/QueueManager.pm | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/fml/lib/FML/Process/QueueManager.pm b/fml/lib/FML/Process/QueueManager.pm index a7661764..7c309479 100644 --- a/fml/lib/FML/Process/QueueManager.pm +++ b/fml/lib/FML/Process/QueueManager.pm @@ -4,7 +4,7 @@ # All rights reserved. This program is free software; you can # redistribute it and/or modify it under the same terms as Perl itself. # -# $FML: QueueManager.pm,v 1.38 2006/03/25 04:07:26 fukachan Exp $ +# $FML: QueueManager.pm,v 1.39 2006/04/01 02:17:05 fukachan Exp $ # package FML::Process::QueueManager; @@ -116,7 +116,12 @@ sub send }; $q->set_log_debug_function($fp); - if ( $q->lock() ) { + # check before try lock (XXX not enough check) + unless ($q->is_valid_active_queue()) { + next QUEUE; + } + + if ( $q->lock() && $q->is_valid_active_queue() ) { my $is_locked = 1; if ( $q->is_valid_active_queue() ) { @@ -142,7 +147,7 @@ sub send $q->unlock() if $is_locked; } else { - $curproc->logwarn("qmgr: qid=$qid is locked. retry"); + $curproc->logdebug("qmgr: qid=$qid is locked or invalid. retry"); } # upper limit of processing done on one process. |
