mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
remove unneeded wrapper function
This commit is contained in:
parent
6ce6018bb7
commit
a1b91ad1ea
|
@ -250,15 +250,21 @@ def cleanup(*args, **kwargs) -> None:
|
|||
exit(0)
|
||||
|
||||
|
||||
def app(config: dict) -> None:
|
||||
def main():
|
||||
"""
|
||||
Main loop which handles the application state
|
||||
:param config: config as dict
|
||||
Loads and validates the config and handles the main loop
|
||||
:return: None
|
||||
"""
|
||||
logger.info('Starting freqtrade %s', __version__)
|
||||
init(config)
|
||||
|
||||
global _CONF
|
||||
with open('config.json') as file:
|
||||
_CONF = json.load(file)
|
||||
|
||||
logger.info('Validating configuration ...')
|
||||
validate(_CONF, CONF_SCHEMA)
|
||||
|
||||
init(_CONF)
|
||||
old_state = get_state()
|
||||
logger.info('Initial State: %s', old_state)
|
||||
telegram.send_msg('*Status:* `{}`'.format(old_state.name.lower()))
|
||||
|
@ -278,17 +284,5 @@ def app(config: dict) -> None:
|
|||
old_state = new_state
|
||||
|
||||
|
||||
def main():
|
||||
"""
|
||||
Loads and validates the config and starts the main loop
|
||||
:return: None
|
||||
"""
|
||||
global _CONF
|
||||
with open('config.json') as file:
|
||||
_CONF = json.load(file)
|
||||
validate(_CONF, CONF_SCHEMA)
|
||||
app(_CONF)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
Loading…
Reference in New Issue
Block a user