Fixed bugs
This commit is contained in:
parent
a4157eadd2
commit
00ee938aeb
|
@ -80,7 +80,7 @@ public class RestSmartExecutor implements SmartExecutor {
|
|||
PluginManager pluginManager = PluginManager.getInstance();
|
||||
Map<String, PluginDeclaration> availablePlugins = pluginManager.getAvailablePlugins();
|
||||
List<PluginDeclaration> plugins = new ArrayList<PluginDeclaration>(availablePlugins.values());
|
||||
return ExtendedSEMapper.getInstance().marshal(plugins);
|
||||
return ExtendedSEMapper.getInstance().marshal(PluginDeclaration.class, plugins);
|
||||
}catch (Exception e) {
|
||||
throw new ExecutorException(e);
|
||||
}
|
||||
|
|
|
@ -264,7 +264,18 @@ public class SmartExecutorScheduler {
|
|||
|
||||
JobKey jobKey = new JobKey(uuid.toString());
|
||||
LaunchParameter launchParameter = getLaunchParameter(jobKey);
|
||||
ScheduledTaskPersistence stc = ScheduledTaskPersistenceFactory.getScheduledTaskPersistence();
|
||||
|
||||
if(launchParameter == null) {
|
||||
if(remove) {
|
||||
logger.debug("Going to remove the SmartExecutor Scheduled Task {} from global scheduling if any", uuid);
|
||||
try {
|
||||
stc.removeScheduledTask(uuid);
|
||||
return;
|
||||
}catch (Exception e) {
|
||||
|
||||
}
|
||||
}
|
||||
throw new ExecutorException("No plugin with UUID " + uuid.toString() + " found.");
|
||||
}
|
||||
Scheduling scheduling = launchParameter.getScheduling();
|
||||
|
@ -272,8 +283,6 @@ public class SmartExecutorScheduler {
|
|||
|
||||
stopTask(uuid);
|
||||
|
||||
ScheduledTaskPersistence stc = ScheduledTaskPersistenceFactory.getScheduledTaskPersistence();
|
||||
|
||||
if(scheduled) {
|
||||
if(remove) {
|
||||
logger.debug("Going to remove the SmartExecutor Scheduled Task {} from global scheduling", uuid);
|
||||
|
|
Loading…
Reference in New Issue