Commit dc58ba03 authored by chenchuanwen's avatar chenchuanwen

run

parent dda33e16
......@@ -42,7 +42,9 @@ class runRedisPush
return (getmypid());
}
}
private function callback($instance,$channelName,$message){
echo $message;
}
private function start()
{
$pid = $this->daemon();
......@@ -54,11 +56,8 @@ class runRedisPush
}
//ini_set('default_socket_timeout', -1);(所有长连接不超时)
$redis->setOption(Redis::OPT_READ_TIMEOUT, -1);
$result=$redis->subscribe(array('redisPublish'), 'callback');
$result=$redis->subscribe(array('redisPublish'), array($this,'callback'));
function callback($instance,$channelName,$message){
echo $message;
}
}
private function stop()
......
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