refs #521: Support Unscheduling of repetitive task on SmartExecutor
https://support.d4science.org/issues/521 Added unschedule API git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/vre-management/smart-executor@119013 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
f2a8767cda
commit
8e97a0b67f
|
@ -14,6 +14,7 @@ import org.gcube.vremanagement.executor.exception.PluginNotFoundException;
|
|||
import org.gcube.vremanagement.executor.persistence.SmartExecutorPersistenceConnector;
|
||||
import org.gcube.vremanagement.executor.plugin.PluginState;
|
||||
import org.gcube.vremanagement.executor.scheduler.SmartExecutorScheduler;
|
||||
import org.quartz.SchedulerException;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
@ -45,6 +46,14 @@ public class SmartExecutorImpl implements SmartExecutor {
|
|||
return uuid.toString();
|
||||
}
|
||||
|
||||
/**{@inheritDoc}*/
|
||||
@Override
|
||||
public void unSchedule(String executionIdentifier) throws SchedulerException {
|
||||
SmartExecutorScheduler smartExecutorScheduler = SmartExecutorInitalizator.getSmartExecutorScheduler();
|
||||
UUID uuid = UUID.fromString(executionIdentifier);
|
||||
smartExecutorScheduler.stop(uuid);
|
||||
}
|
||||
|
||||
/**{@inheritDoc}*/
|
||||
@Override
|
||||
@Deprecated
|
||||
|
@ -94,4 +103,6 @@ public class SmartExecutorImpl implements SmartExecutor {
|
|||
throw new PluginInstanceNotFoundException();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue