parent
9a9cc31d83
commit
61dbb6206f
@ -85,9 +85,12 @@ class Worker:
|
||||
|
||||
# Log state transition
|
||||
if state != old_state:
|
||||
|
||||
if old_state != State.RELOAD_CONFIG:
|
||||
self.freqtrade.notify_status(f'{state.name.lower()}')
|
||||
|
||||
logger.info(f"Changing state to: {state.name}")
|
||||
logger.info(
|
||||
f"Changing state{f' from {old_state.name}' if old_state else ''} to: {state.name}")
|
||||
if state == State.RUNNING:
|
||||
self.freqtrade.startup()
|
||||
|
||||
|
@ -43,7 +43,7 @@ def test_worker_stopped(mocker, default_conf, caplog) -> None:
|
||||
worker.freqtrade.state = State.STOPPED
|
||||
state = worker._worker(old_state=State.RUNNING)
|
||||
assert state is State.STOPPED
|
||||
assert log_has('Changing state to: STOPPED', caplog)
|
||||
assert log_has('Changing state from RUNNING to: STOPPED', caplog)
|
||||
assert mock_throttle.call_count == 1
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user