Skip to content

Commit

Permalink
user story #605134
Browse files Browse the repository at this point in the history
  • Loading branch information
m-seldin committed May 27, 2018
1 parent 2494dba commit 2c06d49
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ public BridgeServiceImpl(Object internalUsageValidator, RestService restService,

this.restService = restService;
this.tasksProcessor = tasksProcessor;

logger.info("Starting background worker...");
startBackgroundWorker();
}

Expand All @@ -83,6 +85,8 @@ public void run() {
CIPluginInfo pluginInfo = pluginServices.getPluginInfo();
String apiKey = pluginServices.getOctaneConfiguration() == null ? "" : pluginServices.getOctaneConfiguration().getApiKey();

logger.info("Executing getAbridgedTasks...");

try {
// get tasks, wait if needed and return with task or timeout or error
tasksJSON = getAbridgedTasks(
Expand All @@ -98,10 +102,12 @@ public void run() {
// regardless of response - reconnect again to keep the light on
startBackgroundWorker();


// now can process the received tasks - if any
if (tasksJSON != null && !tasksJSON.isEmpty()) {
handleTasks(tasksJSON);
}
logger.info("Finished backgroundWorker");
} catch (Throwable t) {
logger.error("connection to Octane Server temporary failed", t);
doWait(1000);
Expand Down

0 comments on commit 2c06d49

Please sign in to comment.