public function __construct()
 {
     $this->dispatcher = new MessageDispatcher();
     if (!self::$redis_manager) {
         self::$redis_manager = RedisManager::getInstance();
     }
 }
<?php

//enable the display of errors
//error_reporting(E_ALL);
//ini_set('display_errors', true);
use backendless\core\lib\Autoload;
use backendless\core\RedisManager;
use backendless\core\Config;
// define short constants
define('DS', DIRECTORY_SEPARATOR);
define('BP', dirname(dirname(__FILE__)));
//include file with backendkess autoloader
include "lib" . DS . "Autoload.php";
//include file with predis autoloader
include "lib" . DS . "predis" . DS . "autoload.php";
// initialize app autoloading
Autoload::register();
Autoload::addNamespace('backendless\\core', BP . DS . 'core');
Config::loadConfig();
$predis = RedisManager::getInstance()->getRedis();
$debug_id = $argv[1];
for (;;) {
    $predis->expire($debug_id, 60);
    sleep(45);
}
예제 #3
0
 private function tryStopDebugIdUpdater()
 {
     if (file_exists(".run")) {
         $pid = file_get_contents(".run");
         if ($pid != "") {
             if (Config::$CORE['os_type'] != "WIN") {
                 //exec("kill -9 $pid");
                 posix_kill((int) $pid, 9);
             }
             //else {    exec("taskkill /F /PID $pid"); }
             $predis = RedisManager::getInstance()->getRedis();
             $predis->expire(Config::$DEBUG_ID, 0);
         }
         unlink(".run");
     }
 }
 public function __construct()
 {
     if (!self::$redis_manager) {
         self::$redis_manager = RedisManager::getInstance();
     }
 }