Commit 19f44ae2 authored by chenchuanwen's avatar chenchuanwen

bridgeReload

parent 8c20de29
...@@ -5,5 +5,14 @@ ...@@ -5,5 +5,14 @@
* Date: 2019/1/17 0017 * Date: 2019/1/17 0017
* Time: 下午 2:29 * Time: 下午 2:29
*/ */
require APPLICATION_PATH . '/scripts/crontab/common.php';
echo 'second_test'.PHP_EOL; $conf = \Yaf\Registry::get('config')->get('redis.database.params');
\ No newline at end of file $redisPublishName=\Yaf\Registry::get('config')->get('redis.redisPublishName');
$redis=new Redis();
$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), array($this,'callback'));
\ No newline at end of file
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