use of de.cinovo.cloudconductor.agent.jobs.handler.OptionHandler in project cloudconductor-agent-redhat by cinovo.
the class HeartBeatJob method run.
@Override
public void run() {
HeartBeatJob.LOGGER.debug("Starting HeartBeatJob");
AgentOption newOptions;
try {
newOptions = ServerCom.heartBeat();
} catch (CloudConductorException e) {
HeartBeatJob.LOGGER.error("Error getting options from server: ", e);
return;
}
new OptionHandler(newOptions).run();
try {
if (AgentState.repoExecutionLock.tryLock()) {
new RepoHandler().run();
}
} catch (ExecutionError e) {
HeartBeatJob.LOGGER.error("Error updating repos: ", e);
} finally {
AgentState.repoExecutionLock.unlock();
}
HeartBeatJob.LOGGER.debug("Finished HeartBeatJob");
}
Aggregations