Skip to content

Commit

Permalink
SYNCT-57: Reschedule when configuration is changed.
Browse files Browse the repository at this point in the history
  • Loading branch information
pkornowski committed Dec 20, 2017
1 parent 676f3dd commit a23555d
Showing 1 changed file with 4 additions and 0 deletions.
Expand Up @@ -52,6 +52,8 @@ private void schedulePullTask() {
try {
if (!Context.getSchedulerService().getScheduledTasks().contains(pullTask)) {
Context.getSchedulerService().scheduleTask(pullTask);
} else {
Context.getSchedulerService().rescheduleTask(pullTask);
}
} catch(SchedulerException e) {
LOGGER.error("Error during starting Sync 2.0 Pull task:", e);
Expand All @@ -65,6 +67,8 @@ private TaskDefinition schedulePushTask() {
try {
if (!Context.getSchedulerService().getScheduledTasks().contains(pushTask)) {
Context.getSchedulerService().scheduleTask(pushTask);
} else {
Context.getSchedulerService().rescheduleTask(pushTask);
}
return pushTask;
} catch(SchedulerException e) {
Expand Down

0 comments on commit a23555d

Please sign in to comment.