fix: worker startup condition
This commit is contained in:
+4
-1
@@ -96,7 +96,10 @@ 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 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()
|
self.freqtrade.startup()
|
||||||
|
|
||||||
if state == State.STOPPED:
|
if state == State.STOPPED:
|
||||||
|
|||||||
Reference in New Issue
Block a user