Skip to content
Snippets Groups Projects
Commit 4c77a5bf authored by Jorrit Schaap's avatar Jorrit Schaap
Browse files

TMSS-717: getSubTasksStartingInThreeMinutes includes subtasks in scheduled and queueing state

parent 0c16e649
No related branches found
No related tags found
1 merge request!447TMSS-717: merge commissioning fixes back to master
......@@ -87,16 +87,28 @@ Json::Value TMSSBridge::getSubTasksStartingInThreeMinutes()
Json::Value result;
if(httpGETAsJson(queryStr, result))
LOG_INFO_STR(string("JSON data for ") << queryStr << std::endl << result.toStyledString());
result = result["results"];
LOG_INFO_STR(string("JSON data for ") << queryStr << std::endl << result.toStyledString());
// combine scheduled list with queuing list
string queryStr2 = "/api/subtask/?state__value=queueing&start_time__gt=" + to_iso_extended_string(lower_limit) + "&start_time__lt=" + to_iso_extended_string(upper_limit) + "&ordering=start_time";
Json::Value result2;
if(httpGETAsJson(queryStr2, result2)) {
LOG_INFO_STR(string("JSON data for ") << queryStr2 << std::endl << result2.toStyledString());
result2 = result2["results"];
result = result.append(result2);
LOG_INFO_STR(string("JSON data for ") << queryStr2 << std::endl << result2.toStyledString());
result.append(result2);
}
LOG_INFO_STR(string("JSON data total") << std::endl << result.toStyledString());
return result;
return Json::Value("");
}
......@@ -246,6 +258,8 @@ bool TMSSBridge::httpQuery(const string& target, string &result, const string& q
curl_global_cleanup();
LOG_INFO_STR(string("[") << query_method << "] code=" << httpCode << " " << url);
LOG_INFO_STR(result);
if (httpCode == 200) {
return true;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment