Added useful log

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/vre-management/smart-executor@146882 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Luca Frosini 2017-04-13 14:41:16 +00:00
parent 4a738db93c
commit 5f275ca444
1 changed files with 10 additions and 0 deletions

View File

@ -30,6 +30,7 @@ import org.gcube.smartgears.ApplicationManager;
import org.gcube.smartgears.ContextProvider;
import org.gcube.smartgears.configuration.container.ContainerConfiguration;
import org.gcube.vremanagement.executor.api.types.LaunchParameter;
import org.gcube.vremanagement.executor.json.ObjectMapperManager;
import org.gcube.vremanagement.executor.persistence.SmartExecutorPersistenceConnector;
import org.gcube.vremanagement.executor.persistence.SmartExecutorPersistenceFactory;
import org.gcube.vremanagement.executor.plugin.PluginDeclaration;
@ -39,6 +40,8 @@ import org.gcube.vremanagement.executor.scheduler.SmartExecutorScheduler;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.fasterxml.jackson.databind.ObjectMapper;
/**
* @author Luca Frosini (ISTI - CNR)
*
@ -324,12 +327,19 @@ public class SmartExecutorInitializator implements ApplicationManager {
logger.debug("someone else is going to take in charge the scheduled task. Skipping.");
continue;
}
final ObjectMapper mapper = ObjectMapperManager.getObjectMapper();
Thread thread = new Thread(){
@Override
public void run(){
LaunchParameter launchParameter = scheduledTask.getLaunchParameter();
try {
logger.info("Going to schedule an already scheduled task with the following parameters {}", mapper.writeValueAsString(launchParameter));
} catch (Exception e1) {
}
SmartExecutorScheduler smartExecutorScheduler = SmartExecutorScheduler.getInstance();