refs #111: Add Recurrent and scheduled Task support
https://support.d4science.org/issues/111 Merging from private branch git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/vre-management/smart-executor-client@117514 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
15c02e73a4
commit
a97fcba76f
2
pom.xml
2
pom.xml
|
@ -10,7 +10,7 @@
|
|||
|
||||
<groupId>org.gcube.vremanagement</groupId>
|
||||
<artifactId>smart-executor-client</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<version>1.1.0-SNAPSHOT</version>
|
||||
<description>Smart Executor Service Client Library</description>
|
||||
|
||||
<dependencyManagement>
|
||||
|
|
|
@ -77,5 +77,26 @@ public class DefaultSmartExecutorProxy implements SmartExecutorProxy {
|
|||
throw again(e).asServiceException();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Override
|
||||
public PluginState getIterationState(final String executionIdentifier, final int iterationNumber)
|
||||
throws PluginInstanceNotFoundException, ExecutorException {
|
||||
|
||||
Call<SmartExecutor, PluginState> call = new Call<SmartExecutor, PluginState>() {
|
||||
@Override
|
||||
public PluginState call(SmartExecutor endpoint) throws Exception {
|
||||
logger.debug("Calling getState() function");
|
||||
return endpoint.getIterationState(executionIdentifier, iterationNumber);
|
||||
}
|
||||
};
|
||||
|
||||
try {
|
||||
return proxyDelegate.make(call);
|
||||
} catch (Exception e) {
|
||||
logger.debug("Failed to call getState() function");
|
||||
throw again(e).asServiceException();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ import java.util.HashMap;
|
|||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.acme.HelloWorldPlugin;
|
||||
import org.acme.HelloWorldPluginDeclaration;
|
||||
import org.gcube.common.scope.api.ScopeProvider;
|
||||
import org.gcube.vremanagement.executor.api.types.LaunchParameter;
|
||||
|
@ -61,6 +62,8 @@ public class DefaultExecutorTest {
|
|||
public void testOk() {
|
||||
Map<String, Object> inputs = new HashMap<String, Object>();
|
||||
inputs.put("Hello", "World");
|
||||
long sleepTime = 10000;
|
||||
inputs.put(HelloWorldPlugin.SLEEP_TIME, sleepTime);
|
||||
LaunchParameter launchParameter = new LaunchParameter(HelloWorldPluginDeclaration.NAME, inputs);
|
||||
try {
|
||||
String executionIdentifier = proxy.launch(launchParameter);
|
||||
|
|
Loading…
Reference in New Issue