Commit 96533bc0 authored by chenchuanwen's avatar chenchuanwen

bridgeReload

parent c25df01a
......@@ -7,6 +7,8 @@
*/
require APPLICATION_PATH . '/scripts/crontab/common.php';
error_reporting(E_ALL ^ E_NOTICE);
$conf = \Yaf\Registry::get('config')->get('redis.database.params');
$redisPublishName=\Yaf\Registry::get('config')->get('redis.redisPublishName');
function callback($instance,$channelName,$message){
try{
$message=json_decode($message,true);
......@@ -30,11 +32,14 @@ function callback($instance,$channelName,$message){
}
pcntl_signal_dispatch();
if (Signal::get() == SIGHUP) {
global $redis;
global $redisPublishName;
$redis->unsubscribe($redisPublishName);
Signal::reset();
}
}
$conf = \Yaf\Registry::get('config')->get('redis.database.params');
$redisPublishName=\Yaf\Registry::get('config')->get('redis.redisPublishName');
$redis=new Redis();
$redis->connect($conf['host'], $conf['port']);
if(!empty($conf['password'])){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment