Commit 9e70eda2 authored by chenchuanwen's avatar chenchuanwen

run

parent 6d4cdd48
......@@ -59,6 +59,10 @@ class runRedisPush
$result=$redis->subscribe(array('redisPublish'), array($this,'callback'));
}
protected function restart(){
$this->stop();
$this->start();
}
private function stop()
{
......@@ -72,7 +76,7 @@ class runRedisPush
private function help($proc)
{
printf("%s start | stop | help \n", $proc);
printf("%s start | stop | help | restart | reload \n", $proc);
}
public function main($argv)
......@@ -86,7 +90,9 @@ class runRedisPush
$this->stop();
} else if ($argv[1] === 'start') {
$this->start();
} else {
} else if($argv[1] === 'restart'){
$this->restart();
}else{
$this->help($argv[0]);
}
}
......
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