From 4fa8c3f9ab1fa0a1f50adcc06f00fe1238ae9e77 Mon Sep 17 00:00:00 2001 From: Axel-CH Date: Tue, 25 Mar 2025 11:55:57 -0400 Subject: [PATCH] fix: worker startup condition --- freqtrade/worker.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/freqtrade/worker.py b/freqtrade/worker.py index 5174680fb..241f7de29 100644 --- a/freqtrade/worker.py +++ b/freqtrade/worker.py @@ -96,7 +96,10 @@ class Worker: logger.info( f"Changing state{f' from {old_state.name}' if old_state else ''} to: {state.name}" ) - if old_state == State.STOPPED and (state == State.RUNNING or state == State.PAUSED): + if state in (State.RUNNING, State.PAUSED) and old_state not in ( + State.RUNNING, + State.PAUSED, + ): self.freqtrade.startup() if state == State.STOPPED: