feat: trigger startup function only when the bot leave the stopped state

This commit is contained in:
Axel-CH
2025-03-23 22:19:16 -04:00
parent 394535c2e8
commit 31625befd1
+1 -1
View File
@@ -96,7 +96,7 @@ class Worker:
logger.info( logger.info(
f"Changing state{f' from {old_state.name}' if old_state else ''} to: {state.name}" f"Changing state{f' from {old_state.name}' if old_state else ''} to: {state.name}"
) )
if state == State.RUNNING or state == State.PAUSED: if old_state == State.STOPPED and (state == State.RUNNING or state == State.PAUSED):
self.freqtrade.startup() self.freqtrade.startup()
if state == State.STOPPED: if state == State.STOPPED: