Commit de69364f authored by chenchuanwen's avatar chenchuanwen

bridgeReload

parent 60e35a4a
...@@ -38,15 +38,15 @@ class Test extends Logger ...@@ -38,15 +38,15 @@ class Test extends Logger
public function run() public function run()
{ {
require APPLICATION_PATH . '/scripts/crontab/push/runRedisBase.php'; require APPLICATION_PATH . '/scripts/crontab/push/runRedisBase.php';
while (true) { // while (true) {
pcntl_signal_dispatch(); // pcntl_signal_dispatch();
printf(".123"); // printf(".123");
sleep(1); // sleep(1);
if (Signal::get() == SIGHUP) { // if (Signal::get() == SIGHUP) {
Signal::reset(); // Signal::reset();
break; // break;
} // }
} // }
printf("\n"); printf("\n");
} }
} }
......
<?php <?php
define("APPLICATION_PATH", realpath(dirname(__FILE__) . '/../../../')); //指向public的上一级 define("APPLICATION_PATH", realpath(dirname(__FILE__) . '/../../../')); //指向public的上一级
//require APPLICATION_PATH . '/scripts/crontab/baseCli.php'; require APPLICATION_PATH . '/scripts/crontab/baseCli.php';
require APPLICATION_PATH . '/scripts/crontab/common.php';
error_reporting(E_ALL ^ E_NOTICE); error_reporting(E_ALL ^ E_NOTICE);
class runRedisPush class runRedisPush
{ {
...@@ -42,7 +43,6 @@ class runRedisPush ...@@ -42,7 +43,6 @@ class runRedisPush
} }
} }
public function callback($instance,$channelName,$message){ public function callback($instance,$channelName,$message){
require APPLICATION_PATH . '/scripts/crontab/common.php';
try{ try{
$message=json_decode($message,true); $message=json_decode($message,true);
$callInstance=$message['className']::getInstance(\Our\DbNameConst::masterDBConnectName); $callInstance=$message['className']::getInstance(\Our\DbNameConst::masterDBConnectName);
...@@ -77,7 +77,6 @@ class runRedisPush ...@@ -77,7 +77,6 @@ class runRedisPush
private function start() private function start()
{ {
$pid = $this->daemon(); $pid = $this->daemon();
require APPLICATION_PATH . '/scripts/crontab/common.php';
$conf = \Yaf\Registry::get('config')->get('redis.database.params'); $conf = \Yaf\Registry::get('config')->get('redis.database.params');
$redisPublishName=\Yaf\Registry::get('config')->get('redis.redisPublishName'); $redisPublishName=\Yaf\Registry::get('config')->get('redis.redisPublishName');
$redis=new Redis(); $redis=new Redis();
......
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