Permalink
Browse files

Allow multiple gearman job servers

  • Loading branch information...
1 parent 66c9977 commit 5a13e67a86d2ef3d3d099d7f96bf64b6d5a48484 @lingej lingej committed Apr 3, 2012
Showing with 6 additions and 2 deletions.
  1. +2 −1 ChangeLog
  2. +2 −1 sample-config/pnp/process_perfdata.cfg-sample.in
  3. +2 −0 scripts/process_perfdata.pl.in
View
@@ -1,6 +1,7 @@
**pnp-0.6.18 ??/??/2012**
* Bugfix: Fixed STORAGE_TYPE and CUSTOM_TEMPLATE vars used in custom templates
- * Bugfix: Blank Screen on PHP 5.4 fixed
+ * Bugfix: Blank screen on PHP 5.4 fixed
+ * Feature: Allow multiple gearman job servers
**pnp-0.6.17 03/25/2012**
* Bugfix: Fixed rrd_convert.pl while running with --dry-run
@@ -100,7 +100,8 @@ PREFORK = 1
#
# Gearman server to connect to
-#
+# Comma separated list of gearman job servers
+#
GEARMAN_HOST = localhost:4730
#
@@ -1427,6 +1427,8 @@ sub new_child {
or die "Can't unblock SIGINT for fork: $!\n";
my $worker = Gearman::Worker->new();
+ my @job_servers = split(/,/, $conf{'GEARMAN_HOST'}); # allow multiple gearman job servers
+ $worker->job_servers(@job_servers);
$worker->job_servers($conf{'GEARMAN_HOST'});
$worker->register_function("perfdata", 2, sub { return main(@_); });
my %opt = (

0 comments on commit 5a13e67

Please sign in to comment.