Commit f65fb4f2 authored by chenchuanwen's avatar chenchuanwen

bridgeReload

parent b3bfa678
<?php
$redis= new Redis();
$redis->
date_default_timezone_set("Asia/Shanghai");
mb_internal_encoding("UTF-8");
define("TIMESTAMP",time());
......
......@@ -31,7 +31,6 @@ function callback($instance,$channelName,$message){
pcntl_signal_dispatch();
if (Signal::get() == SIGHUP) {
Signal::reset();
exit;
}
}
$conf = \Yaf\Registry::get('config')->get('redis.database.params');
......@@ -41,6 +40,7 @@ $redis->connect($conf['host'], $conf['port']);
if(!empty($conf['password'])){
$redis->auth($conf['password']);
}
//ini_set('default_socket_timeout', -1);(所有长连接不超时)
$redis->setOption(Redis::OPT_READ_TIMEOUT, -1);
$result=$redis->subscribe(array($redisPublishName), 'callback');
\ No newline at end of file
......@@ -37,7 +37,8 @@ class Test extends Logger
public function run()
{
require APPLICATION_PATH . '/scripts/crontab/push/runRedisBase.php';
require APPLICATION_PATH . '/scripts/crontab/push/runRedisBase.php';
// while (true) {
// pcntl_signal_dispatch();
// printf(".123");
......
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