Search in sources :

Example 1 with ConfigFileHandler

use of de.cinovo.cloudconductor.agent.jobs.handler.ConfigFileHandler in project cloudconductor-agent-redhat by cinovo.

the class FilesJob method run.

@Override
public void run() {
    FilesJob.LOGGER.debug("Started FilesJob");
    // only run if no other blocking job is currently running
    if (AgentState.filesExecutionLock.tryLock()) {
        try {
            new ConfigFileHandler().run();
        } catch (ExecutionError e) {
            if (e.getCause() instanceof CloudConductorException) {
                FilesJob.LOGGER.debug(e.getMessage(), e);
            }
        } finally {
            AgentState.filesExecutionLock.unlock();
        }
    }
    FilesJob.LOGGER.debug("Finished FilesJob");
}
Also used : CloudConductorException(de.cinovo.cloudconductor.api.lib.exceptions.CloudConductorException) ExecutionError(de.cinovo.cloudconductor.agent.exceptions.ExecutionError) ConfigFileHandler(de.cinovo.cloudconductor.agent.jobs.handler.ConfigFileHandler)

Aggregations

ExecutionError (de.cinovo.cloudconductor.agent.exceptions.ExecutionError)1 ConfigFileHandler (de.cinovo.cloudconductor.agent.jobs.handler.ConfigFileHandler)1 CloudConductorException (de.cinovo.cloudconductor.api.lib.exceptions.CloudConductorException)1