|
|
@@ -690,6 +690,7 @@ class Worker
|
|
|
);
|
|
|
$usage = "Usage: php yourfile <command> [mode]\nCommands: \nstart\t\tStart worker in DEBUG mode.\n\t\tUse mode -d to start in DAEMON mode.\nstop\t\tStop worker.\n\t\tUse mode -g to stop gracefully.\nrestart\t\tRestart workers.\n\t\tUse mode -d to start in DAEMON mode.\n\t\tUse mode -g to stop gracefully.\nreload\t\tReload codes.\n\t\tUse mode -g to reload gracefully.\nstatus\t\tGet worker status.\n\t\tUse mode -d to show live status.\nconnections\tGet worker connections.\n";
|
|
|
if (!isset($argv[1]) || !in_array($argv[1], $available_commands)) {
|
|
|
+ echo 'Unknown command: ' . $argv[1] . '\n';
|
|
|
exit($usage);
|
|
|
}
|
|
|
|
|
|
@@ -810,7 +811,7 @@ class Worker
|
|
|
posix_kill($master_pid, $sig);
|
|
|
exit;
|
|
|
default :
|
|
|
- echo 'Unknow command: ' . $command . '\n';
|
|
|
+ echo 'Unknown command: ' . $command . '\n';
|
|
|
exit($usage);
|
|
|
}
|
|
|
}
|