Move startup to freqtradebot
This commit is contained in:
parent
6dc2175e1f
commit
349c0619aa
@ -89,6 +89,14 @@ class FreqtradeBot(object):
|
|||||||
self.rpc.cleanup()
|
self.rpc.cleanup()
|
||||||
persistence.cleanup()
|
persistence.cleanup()
|
||||||
|
|
||||||
|
def startup(self) -> None:
|
||||||
|
"""
|
||||||
|
Called on startup and after reloading the bot - triggers notifications and
|
||||||
|
performs startup tasks
|
||||||
|
: return: None
|
||||||
|
"""
|
||||||
|
self.rpc.startup_messages(self.config, self.pairlists)
|
||||||
|
|
||||||
def process(self) -> bool:
|
def process(self) -> bool:
|
||||||
"""
|
"""
|
||||||
Queries the persistence layer for open trades and handles them,
|
Queries the persistence layer for open trades and handles them,
|
||||||
|
@ -91,7 +91,7 @@ class Worker(object):
|
|||||||
})
|
})
|
||||||
logger.info('Changing state to: %s', state.name)
|
logger.info('Changing state to: %s', state.name)
|
||||||
if state == State.RUNNING:
|
if state == State.RUNNING:
|
||||||
self.freqtrade.rpc.startup_messages(self._config, self.freqtrade.pairlists)
|
self.freqtrade.startup()
|
||||||
|
|
||||||
if state == State.STOPPED:
|
if state == State.STOPPED:
|
||||||
# Ping systemd watchdog before sleeping in the stopped state
|
# Ping systemd watchdog before sleeping in the stopped state
|
||||||
|
Loading…
Reference in New Issue
Block a user