This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git
commit 1791b631ef1f1220a1288b149498539c910dc441 Author: Claus Ibsen <[email protected]> AuthorDate: Tue Jan 28 16:44:37 2020 +0100 CAMEL-14354: camel-timer optimize --- .../main/java/org/apache/camel/component/timer/TimerConsumer.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/components/camel-timer/src/main/java/org/apache/camel/component/timer/TimerConsumer.java b/components/camel-timer/src/main/java/org/apache/camel/component/timer/TimerConsumer.java index 1204478..fdf97af 100644 --- a/components/camel-timer/src/main/java/org/apache/camel/component/timer/TimerConsumer.java +++ b/components/camel-timer/src/main/java/org/apache/camel/component/timer/TimerConsumer.java @@ -146,9 +146,8 @@ public class TimerConsumer extends DefaultConsumer implements StartupListener, S * Whether the timer task is allow to run or not */ protected boolean isTaskRunAllowed() { - // only allow running the timer task if we can run and are not suspended, - // and CamelContext must have been fully started - return endpoint.getCamelContext().getStatus().isStarted() && isRunAllowed() && !isSuspended(); + // only run if we are started + return isStarted(); } protected void configureTask(TimerTask task, Timer timer) {
