Do not stop the service if publishing o new IS fails
This commit is contained in:
parent
fd30b3dd0d
commit
cf094b088e
|
@ -8,6 +8,7 @@ import org.gcube.smartgears.ContextProvider;
|
|||
import org.gcube.smartgears.context.application.ApplicationContext;
|
||||
import org.gcube.vremanagement.executor.api.types.LaunchParameter;
|
||||
import org.gcube.vremanagement.executor.ispublisher.ISPublisher;
|
||||
import org.gcube.vremanagement.executor.ispublisher.RestISPublisher;
|
||||
import org.gcube.vremanagement.executor.json.ExtendedSEMapper;
|
||||
import org.gcube.vremanagement.executor.persistence.SmartExecutorPersistenceConnector;
|
||||
import org.gcube.vremanagement.executor.persistence.SmartExecutorPersistenceFactory;
|
||||
|
@ -66,8 +67,10 @@ public class SmartExecutorInitializator implements ApplicationManager {
|
|||
try {
|
||||
isPublisher.publishPlugins(availablePlugins);
|
||||
}catch (Exception e) {
|
||||
logger.error("Unable to Create ServiceEndpoint for scope {}. The Service will be aborted", scope, e);
|
||||
throw new RuntimeException(e);
|
||||
logger.error("Unable to create plugins is resources in context {}. The Service will be aborted", scope, e);
|
||||
if(!(isPublisher instanceof RestISPublisher)) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ import org.gcube.vremanagement.executor.pluginmanager.PluginManager;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
class GCoreISPublisher extends ISPublisher {
|
||||
public class GCoreISPublisher extends ISPublisher {
|
||||
|
||||
private static Logger logger = LoggerFactory.getLogger(GCoreISPublisher.class);
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ import org.gcube.vremanagement.executor.pluginmanager.PluginManager;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
class RestISPublisher extends ISPublisher {
|
||||
public class RestISPublisher extends ISPublisher {
|
||||
|
||||
private static Logger logger = LoggerFactory.getLogger(RestISPublisher.class);
|
||||
|
||||
|
|
Loading…
Reference in New Issue