Skip to content

Commit

Permalink
[sre] Stop not periodic tasks on exception.
Browse files Browse the repository at this point in the history
Signed-off-by: Stéphane Galland <galland@arakhne.org>
  • Loading branch information
gallandarakhneorg committed Dec 2, 2016
1 parent d30cd8e commit 255cada
Showing 1 changed file with 5 additions and 0 deletions.
Expand Up @@ -227,6 +227,11 @@ public void run() {
if (task.getGuard().apply(owner).booleanValue()) {
task.getProcedure().apply(owner);
}
} catch (Throwable ex) {
if (this.isPeriodic) {
finishTask(task.getName());
}
throw ex;
} finally {
if (!this.isPeriodic) {
finishTask(task.getName());
Expand Down

0 comments on commit 255cada

Please sign in to comment.