diff --git a/MAC/APL/MainCU/src/MACScheduler/MACScheduler.cc b/MAC/APL/MainCU/src/MACScheduler/MACScheduler.cc index 070672448124bd3697786a99704e1dd4ca1c3ec9..e19da90cfb6bb32c42a9f60ee28c8ee326446fb8 100644 --- a/MAC/APL/MainCU/src/MACScheduler/MACScheduler.cc +++ b/MAC/APL/MainCU/src/MACScheduler/MACScheduler.cc @@ -577,6 +577,9 @@ GCFEvent::TResult MACScheduler::active_state(GCFEvent& event, GCFPortInterface& tm.setTreeState(theObs->second, tsc.get("queued")); #endif } else { + // TODO: set to queueing state the moment MAC knows about this upoming obs. + // I've tried that but it's realy hard to keep the MAC internal bookkeeping and TMSS in sync. + itsTMSSconnection->setSubtaskState(subtask_id, "queueing"); itsTMSSconnection->setSubtaskState(theObs->second, "queued"); } break; @@ -922,8 +925,6 @@ void MACScheduler::_updatePlannedList() OLiter prepIter = itsPreparedObs.find(subtask_id); if ((prepIter == itsPreparedObs.end()) || (prepIter->second.prepReady == false) || (prepIter->second.modTime != modTime)) { - itsTMSSconnection->setSubtaskState(subtask_id, "queueing"); - // create a ParameterFile for this Observation string parsetText = itsTMSSconnection->getParsetAsText(subtask_id); if(prepIter == itsPreparedObs.end()) { diff --git a/MAC/APL/MainCU/src/MACScheduler/TMSSBridge.cc b/MAC/APL/MainCU/src/MACScheduler/TMSSBridge.cc index a6f9c985dc8080e0a94ad029260706ad93f32edf..6c61049d5b0a6685f886cd4c42f602eba8387131 100644 --- a/MAC/APL/MainCU/src/MACScheduler/TMSSBridge.cc +++ b/MAC/APL/MainCU/src/MACScheduler/TMSSBridge.cc @@ -87,33 +87,7 @@ 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"]; - - LOG_INFO_STR(string("JSON data for ") << queryStr2 << std::endl << result2.toStyledString()); - - for (int32 idx =0; idx < result2.size(); idx++) { - Json::Value item = result2[idx]; - LOG_INFO_STR(string("appending item ") << std::endl << item.toStyledString()); - result.append(item); - } - } - - LOG_INFO_STR(string("JSON data total") << std::endl << result.toStyledString()); - - return result; + return result["results"]; return Json::Value(""); }