Fixed START command
This commit is contained in:
parent
b18842308f
commit
4df6a320ca
1 changed files with 15 additions and 17 deletions
32
src/App.cpp
32
src/App.cpp
|
@ -247,22 +247,20 @@ void App::onSignal(uv_signal_t* handle, int signum)
|
||||||
|
|
||||||
void App::onCommandReceived(uv_async_t* async)
|
void App::onCommandReceived(uv_async_t* async)
|
||||||
{
|
{
|
||||||
if (async->data) {
|
auto command = reinterpret_cast<ControlCommand::Command &> (async->data);
|
||||||
auto command = reinterpret_cast<ControlCommand::Command &> (async->data);
|
switch (command) {
|
||||||
switch (command) {
|
case ControlCommand::START:
|
||||||
case ControlCommand::START:
|
Workers::setEnabled(true);
|
||||||
Workers::setEnabled(true);
|
break;
|
||||||
break;
|
case ControlCommand::STOP:
|
||||||
case ControlCommand::STOP:
|
Workers::setEnabled(false);
|
||||||
Workers::setEnabled(false);
|
break;
|
||||||
break;
|
case ControlCommand::UPDATE_CONFIG:;
|
||||||
case ControlCommand::UPDATE_CONFIG:;
|
case ControlCommand::RESTART:
|
||||||
case ControlCommand::RESTART:
|
App::restart();
|
||||||
App::restart();
|
break;
|
||||||
break;
|
case ControlCommand::SHUTDOWN:
|
||||||
case ControlCommand::SHUTDOWN:
|
App::shutdown();
|
||||||
App::shutdown();
|
break;
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue