def main(): chdir_to_data_directory() secrets_manager_cls = ETHKeyFileSecretManger ev_loop: asyncio.AbstractEventLoop = asyncio.get_event_loop() client_config_map = load_client_config_map_from_file() if login_prompt(secrets_manager_cls, style=load_style(client_config_map)): ev_loop.run_until_complete(main_async(client_config_map))
async def main(): chdir_to_data_directory() await create_yml_files() # This init_logging() call is important, to skip over the missing config warnings. init_logging("hummingbot_logs.yml") hb = HummingbotApplication.main_application() setHummingInstance(hb) read_configs_from_yml() ExchangeRateConversion.get_instance().start() with patch_stdout(log_field=hb.app.log_field): dev_mode = check_dev_mode() if dev_mode: hb.app.log( "Running from dev branches. Full remote logging will be enabled." ) init_logging( "hummingbot_logs.yml", override_log_level=global_config_map.get("log_level").value, dev_mode=dev_mode) tasks: List[Coroutine] = [hb.run(), sio.connect('ws://localhost:5000')] await safe_gather(*tasks)
async def main(): chdir_to_data_directory() await create_yml_files() # This init_logging() call is important, to skip over the missing config warnings. init_logging("hummingbot_logs.yml") read_configs_from_yml() ExchangeRateConversion.get_instance().start() hb = HummingbotApplication.main_application() with patch_stdout(log_field=hb.app.log_field): dev_mode = check_dev_mode() if dev_mode: hb.app.log( "Running from dev branches. Full remote logging will be enabled." ) init_logging( "hummingbot_logs.yml", override_log_level=global_config_map.get("log_level").value, dev_mode=dev_mode) tasks: List[Coroutine] = [hb.run()] if global_config_map.get("debug_console").value: if not hasattr(__builtins__, "help"): import _sitebuiltins __builtins__.help = _sitebuiltins._Helper() from hummingbot.core.management.console import start_management_console management_port: int = detect_available_port(8211) tasks.append( start_management_console(locals(), host="localhost", port=management_port)) await safe_gather(*tasks)
init_logging("hummingbot_logs.yml") read_system_configs_from_yml() hb = HummingbotApplication.main_application() with patch_stdout(log_field=hb.app.log_field): dev_mode = check_dev_mode() if dev_mode: hb.app.log("Running from dev branches. Full remote logging will be enabled.") init_logging("hummingbot_logs.yml", override_log_level=global_config_map.get("log_level").value, dev_mode=dev_mode) tasks: List[Coroutine] = [hb.run()] if global_config_map.get("debug_console").value: if not hasattr(__builtins__, "help"): import _sitebuiltins __builtins__.help = _sitebuiltins._Helper() from hummingbot.core.management.console import start_management_console management_port: int = detect_available_port(8211) tasks.append(start_management_console(locals(), host="localhost", port=management_port)) await safe_gather(*tasks) if __name__ == "__main__": chdir_to_data_directory() if login_prompt(): ev_loop: asyncio.AbstractEventLoop = asyncio.get_event_loop() ev_loop.run_until_complete(main())
def main(): chdir_to_data_directory() if login_prompt(): ev_loop: asyncio.AbstractEventLoop = asyncio.get_event_loop() ev_loop.run_until_complete(main_async())