Support Scheduled Task take in charge from Orphaned RIs


git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/vre-management/smart-executor@142460 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Luca Frosini 2017-02-10 16:09:23 +00:00
parent 24a9b093cc
commit 626b8f2edd
1 changed files with 3 additions and 4 deletions

View File

@ -223,8 +223,6 @@ public class OrientDBPersistenceConnector extends
db = oPartitionedDatabasePool.acquire();
String type = ScheduledTask.class.getSimpleName();
String queryString = String.format("SELECT * FROM %s", type);
if(pluginDeclarations!=null && pluginDeclarations.size()!=0){
boolean first = true;
@ -342,8 +340,9 @@ public class OrientDBPersistenceConnector extends
ODocument doc = getScheduledTaskDocument(db, uuid);
long timestamp = doc.field(TIMESTAMP);
if (timestamp != scheduledTask.getTimestamp()) {
Long timestamp = doc.field(TIMESTAMP);
if (timestamp!=null && timestamp != scheduledTask.getTimestamp()) {
throw new SchedulePersistenceException(
"The ScheduledTask has been already reserved.");
}