@@ -97,7 +97,7 @@ private function _doRescue() {
9797 /*
9898 * rescue MongoDB if needed
9999 */
100- $ this ->_rescueMongoDB ();
100+ // $this->_rescueMongoDB();
101101
102102 /*
103103 * rescue mysql if needed (maybe httpd depends on mysql, so try this first!)
@@ -311,71 +311,72 @@ private function _rescueHttpd(){
311311 $ this ->_rescueDaemon ($ daemon );
312312 }
313313
314+
314315 /**
315316 * restarts MongoDB, if needed
316317 */
317- private function _rescueMongoDB (){
318- global $ app , $ conf ;
318+ // private function _rescueMongoDB(){
319+ // global $app, $conf;
319320
320321 /*
321322 * do nothing, if it is not allowed to rescue mysql
322323 */
323- if ((isset ($ conf ['serverconfig ' ]['rescue ' ]['do_not_try_rescue_mongodb ' ]) && ($ conf ['serverconfig ' ]['rescue ' ]['do_not_try_rescue_mongodb ' ]) == 'y ' )){
324- return ;
325- }
324+ // if ((isset($conf['serverconfig']['rescue']['do_not_try_rescue_mongodb']) && ($conf['serverconfig']['rescue']['do_not_try_rescue_mongodb']) == 'y')){
325+ // return;
326+ // }
326327
327328 /*
328329 * if the service is up and running, or the service is not installed there is nothing to do...
329330 */
330- if ($ this ->_monitoringData [0 ][0 ]['data ' ]['mongodbserver ' ] != 0 ){
331- /* Clear the try counter, because we do not have to try to rescue the service */
332- $ this ->_rescueData ['mongodbserver ' ]['try_counter ' ] = 0 ;
333- return ;
334- }
331+ // if ($this->_monitoringData[0][0]['data']['mongodbserver'] != 0){
332+ // /* Clear the try counter, because we do not have to try to rescue the service */
333+ // $this->_rescueData['mongodbserver']['try_counter'] = 0;
334+ // return;
335+ // }
335336
336337 /*
337338 * OK, the service is installed and down.
338339 * Maybe this is because of a restart of the service by the admin.
339340 * This means, we check the data 1 minute ago
340341 */
341- if ((!isset ($ this ->_monitoringData [1 ][0 ]['data ' ]['mongodbserver ' ])) ||
342- ((isset ($ this ->_monitoringData [1 ][0 ]['data ' ]['mongodbserver ' ])) && ($ this ->_monitoringData [1 ][0 ]['data ' ]['mongodbserver ' ] != 0 ))){
342+ // if ((!isset($this->_monitoringData[1][0]['data']['mongodbserver'])) ||
343+ // ((isset($this->_monitoringData[1][0]['data']['mongodbserver'])) && ($this->_monitoringData[1][0]['data']['mongodbserver'] != 0))){
343344 /*
344345 * We do NOT have this data or we have this data, but the webserver was not down 1 minute ago.
345346 * This means, it could be, that the admin is restarting the server.
346347 * We wait one more minute...
347348 */
348- return ;
349- }
349+ // return;
350+ // }
350351
351352 /*#####
352353 * The service is down and it was down 1 minute ago.
353354 * We try to rescue it
354355 *#####*/
355356
356357 /* Get the try counter */
357- $ tryCount = (!isset ($ this ->_rescueData ['mongodbserver ' ]['try_counter ' ]))? 1 : $ this ->_rescueData ['mongodbserver ' ]['try_counter ' ] + 1 ;
358+ // $tryCount = (!isset($this->_rescueData['mongodbserver']['try_counter']))? 1 : $this->_rescueData['mongodbserver']['try_counter'] + 1;
358359
359360 /* Set the new try counter */
360- $ this ->_rescueData ['mongodbserver ' ]['try_counter ' ] = $ tryCount ;
361+ // $this->_rescueData['mongodbserver']['try_counter'] = $tryCount;
361362
362363 /* if 5 times will not work, we have to give up... */
363- if ($ tryCount > 5 ){
364- $ app ->log ('MongoDB is down! Rescue will not help! ' , LOGLEVEL_ERROR );
365- return ;
366- }
364+ // if ($tryCount > 5){
365+ // $app->log('MongoDB is down! Rescue will not help!', LOGLEVEL_ERROR);
366+ // return;
367+ // }
367368
368369
369- $ app ->log ('MongoDB is down! Try rescue MongoDB (try: ' . $ tryCount . ')... ' , LOGLEVEL_WARN );
370+ // $app->log('MongoDB is down! Try rescue MongoDB (try:' . $tryCount . ')...', LOGLEVEL_WARN);
370371
371- if (is_file ($ conf ['init_scripts ' ] . '/ ' . 'mongodb ' )) {
372- $ daemon = 'mongodb ' ;
373- } else {
374- $ daemon = 'mongodb ' ;
375- }
372+ // if(is_file($conf['init_scripts'] . '/' . 'mongodb')) {
373+ // $daemon = 'mongodb';
374+ // } else {
375+ // $daemon = 'mongodb';
376+ // }
376377
377- $ this ->_rescueDaemon ($ daemon );
378- }
378+ // $this->_rescueDaemon($daemon);
379+ // }
379380
380381 /**
381382 * restarts mysql, if needed
0 commit comments