Permalink
Browse files

Use `$Chunks`, if available, to repeat the queue.

This prevents an extra query when `--chunks` is used in `bric_queued`.
  • Loading branch information...
1 parent 9b73869 commit 497811aaf7b153bfed4bdcf8505432d2568889f7 @theory theory committed Jul 8, 2010
Showing with 2 additions and 2 deletions.
  1. +2 −2 bin/bric_queued
View
@@ -238,7 +238,7 @@ sub run_as_daemon {
Limit => $Chunks,
})) {
logit('Executing ' . $job->get_name . "\n") if $Verbose;
- $has_jobs = 1;
+ $has_jobs++;
eval {
$job->execute_me;
commit_events();
@@ -248,7 +248,7 @@ sub run_as_daemon {
}
# If we found jobs, assume there are more. Don't wait to execute them.
- next if $has_jobs;
+ next if $has_jobs && (!$Chunks || $Chunks == $has_jobs);
# Flush out the publish_another queue.
if ($pkg eq PUB_PKG) {

0 comments on commit 497811a

Please sign in to comment.