diff options
author | ivan <ivan> | 2009-12-29 00:38:11 +0000 |
---|---|---|
committer | ivan <ivan> | 2009-12-29 00:38:11 +0000 |
commit | 50426a1493ea142877f16be8383453ce5ad09021 (patch) | |
tree | 6ba06d8c02bcb5c627c47273a615eeaf022d12d7 | |
parent | 131aba5f00163b03024dd78cbd4ebd8be6366105 (diff) |
add queued-sleep_time
-rw-r--r-- | FS/FS/Conf.pm | 9 | ||||
-rw-r--r-- | FS/bin/freeside-queued | 5 |
2 files changed, 11 insertions, 3 deletions
diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index d4376c309..eaafe9984 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -422,7 +422,7 @@ worry that config_items is freeside-specific and icky. { 'key' => 'business-onlinepayment-description', 'section' => 'billing', - 'description' => 'String passed as the description field to <a href="http://search.cpan.org/search?mode=module&query=Business%3A%3AOnlinePayment">Business::OnlinePayment</a>. Evaluated as a double-quoted perl string, with the following variables available: <code>$agent</code> (the agent name), and <code>$pkgs</code> (a comma-separated list of packages for which these charges apply)', + 'description' => 'String passed as the description field to <a href="http://search.cpan.org/search?mode=module&query=Business%3A%3AOnlinePayment">Business::OnlinePayment</a>. Evaluated as a double-quoted perl string, with the following variables available: <code>$agent</code> (the agent name), and <code>$pkgs</code> (a comma-separated list of packages for which these charges apply - not available in all situations)', 'type' => 'text', }, @@ -2513,6 +2513,13 @@ worry that config_items is freeside-specific and icky. }, { + 'key' => 'queued-sleep_time', + 'section' => '', + 'description' => 'Time to sleep between attempts to find new jobs to process in the queue. Defaults to 10. Installations doing real-time CDR processing for prepaid may want to set it lower.' + 'type' => 'text', + }, + + { 'key' => 'cancelled_cust-noevents', 'section' => 'billing', 'description' => "Don't run events for cancelled customers", diff --git a/FS/bin/freeside-queued b/FS/bin/freeside-queued index 2188dd404..740f14f5f 100644 --- a/FS/bin/freeside-queued +++ b/FS/bin/freeside-queued @@ -1,7 +1,7 @@ #!/usr/bin/perl -w use strict; -use vars qw( $DEBUG $kids $max_kids %kids ); +use vars qw( $DEBUG $kids $max_kids $sleep_time %kids ); use POSIX qw(:sys_wait_h); use IO::File; use FS::UID qw(adminsuidsetup forksuidsetup driver_name dbh myconnect); @@ -49,6 +49,7 @@ daemonize2(); my $conf = new FS::Conf; $max_kids = $conf->config('queued-max_kids') || 10; +$sleep_time = $conf->config('queued-sleep_time') || 10; my $warnkids=0; while (1) { @@ -108,7 +109,7 @@ while (1) { undef $FS::UID::dbh; next; }; - sleep 1; + sleep $sleep_time; next; } |