Skip to content

Commit

Permalink
Fix buildProcessPerfdataCache on low loaded systems
Browse files Browse the repository at this point in the history
  • Loading branch information
nook24 committed Oct 11, 2016
1 parent 54cc384 commit 2fe4c57
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cakephp/app/Config/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
CakePlugin::load('BoostCake');

//Define versions
define('STATUSENIGNE_VERSION', '2.0.1');
define('STATUSENIGNE_VERSION', '2.0.2');
define('PERFDATA_VERSION', '1.2.0');


Expand Down
11 changes: 6 additions & 5 deletions cakephp/app/Console/Command/StatusengineLegacyShell.php
Original file line number Diff line number Diff line change
Expand Up @@ -2763,7 +2763,7 @@ public function waitForInstructions(){
* witch is bad because if GearmanWorker::work() stuck, PHP can not execute the signal handler
*/
$this->worker->addOptions(GEARMAN_WORKER_NON_BLOCKING);
$this->worker->setTimeout(1000);
$this->worker->setTimeout(250);

$this->worker->addServer(Configure::read('server'), Configure::read('port'));
foreach($this->queues as $queueName => $functionName){
Expand All @@ -2786,16 +2786,17 @@ public function waitForInstructions(){
if(isset($this->queues['statusngin_servicechecks'])){
CakeLog::info('Build up new process perfdata cache');
$this->buildProcessPerfdataCache();

$this->cacheHostNamesForGraphiteIfRequried();
$this->cacheServiceNamesForGraphiteIfRequried();
}
}

$this->cacheHostNamesForGraphiteIfRequried();
$this->cacheServiceNamesForGraphiteIfRequried();

CakeLog::info('I will continue my work');
$this->childWork();

}


pcntl_signal_dispatch();
//Check if the parent process still exists
if($this->parentPid != posix_getppid()){
Expand Down

0 comments on commit 2fe4c57

Please sign in to comment.