refs #579: Use Persistence to persist Scheduled Task configuration on smart-executor
https://support.d4science.org/issues/579 git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/vre-management/smart-executor@119470 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
af20689c68
commit
f81ffa5377
|
@ -208,11 +208,9 @@ public class CouchDBPersistenceConnector extends SmartExecutorPersistenceConnect
|
||||||
startKey.add(scope);
|
startKey.add(scope);
|
||||||
ArrayNode endKey = new ObjectMapper().createArrayNode();
|
ArrayNode endKey = new ObjectMapper().createArrayNode();
|
||||||
endKey.add(scope);
|
endKey.add(scope);
|
||||||
|
if(pluginDeclaration!=null && pluginDeclaration.getName()!=null && pluginDeclaration.getName().compareTo("")!=0){
|
||||||
String pluginName = pluginDeclaration.getName();
|
startKey.add(pluginDeclaration.getName());
|
||||||
if(pluginName!=null && pluginName.compareTo("")!=0){
|
endKey.add(pluginDeclaration.getName());
|
||||||
startKey.add(pluginName);
|
|
||||||
endKey.add(pluginName);
|
|
||||||
query = query.viewName(PLUGIN_STATE_VIEW_ABANDONED);
|
query = query.viewName(PLUGIN_STATE_VIEW_ABANDONED);
|
||||||
}else{
|
}else{
|
||||||
query = query.viewName(PLUGIN_STATE);
|
query = query.viewName(PLUGIN_STATE);
|
||||||
|
@ -224,15 +222,20 @@ public class CouchDBPersistenceConnector extends SmartExecutorPersistenceConnect
|
||||||
if(iterationNumber != LAST){
|
if(iterationNumber != LAST){
|
||||||
startKey.add(iterationNumber);
|
startKey.add(iterationNumber);
|
||||||
endKey.add(iterationNumber);
|
endKey.add(iterationNumber);
|
||||||
}
|
|
||||||
|
|
||||||
|
startKey.add(1);
|
||||||
|
endKey.add("{}");
|
||||||
|
}else{
|
||||||
// Adding time interval
|
// Adding time interval
|
||||||
startKey.add(1);
|
startKey.add(1);
|
||||||
endKey.add("{}");
|
endKey.add("{}");
|
||||||
|
}
|
||||||
|
|
||||||
query.startKey(startKey);
|
query.startKey(startKey);
|
||||||
query.endKey(endKey);
|
query.endKey(endKey);
|
||||||
|
|
||||||
|
query.reduce(false);
|
||||||
|
|
||||||
PluginState pluginState = null;
|
PluginState pluginState = null;
|
||||||
ViewResult viewResult = query(query);
|
ViewResult viewResult = query(query);
|
||||||
for (ViewResult.Row row : viewResult) {
|
for (ViewResult.Row row : viewResult) {
|
||||||
|
|
Loading…
Reference in New Issue