Commit 2e4c0c2a authored by Volodymyr Yurchenko's avatar Volodymyr Yurchenko
Browse files

Increase command timeout;

Disable stdout messages with -nomsg
parent a6fc27a6
Pipeline #1055298 passed with stage
in 1 minute and 27 seconds
......@@ -167,7 +167,7 @@ void TJAlienConnectionManager::MakeWebsocketConnection(TJAlienCredentialsObject
creation_info.options = 0;
creation_info.vhost_name = "tjalien-root";
creation_info.options |= LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT;
creation_info.ws_ping_pong_interval = 10;
creation_info.ws_ping_pong_interval = 60*15;
creation_info.timeout_secs = 5;
// TODO (nhardi): switch to explicit key/cert contents
......@@ -429,21 +429,24 @@ json_object *TJAlienConnectionManager::CreateJsonCommand(TString *command, TList
json_object *jobj = json_object_new_object();
json_object *jstringcmd = json_object_new_string(command->Data());
json_object_object_add(jobj, "command", jstringcmd);
json_object *jarray = json_object_new_array();
if (opt != nullptr && opt->GetEntries() != 0)
{
json_object *jarray = json_object_new_array();
for(int i = 0; i < opt->GetSize(); i++)
for (int i = 0; i < opt->GetSize(); i++)
{
TObjString *ovalue = (TObjString*) opt->At(i);
TString svalue = ovalue->GetString();
json_object *jstring1 = json_object_new_string(svalue);
json_object_array_add(jarray, jstring1);
}
json_object_object_add(jobj, "options", jarray);
}
// Disable stdout message output; TJAlien reconstructs stdout from all response values on it's own
json_object *jstringnomsg = json_object_new_string("-nomsg");
json_object_array_add(jarray, jstringnomsg);
json_object_object_add(jobj, "options", jarray);
return jobj;
}
......
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