From 923b9489b57ccb2e18a70d0beb59e44adc5cb868 Mon Sep 17 00:00:00 2001 From: enarjord Date: Tue, 30 May 2023 23:27:16 +0200 Subject: [PATCH 1/2] forager update frequency is parameterized --- forager.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/forager.py b/forager.py index c8b7b001d..e07a64e4d 100644 --- a/forager.py +++ b/forager.py @@ -400,6 +400,7 @@ async def main(): ("symbols_to_ignore", []), ("live_configs_map_long", {}), ("live_configs_map_short", {}), + ("update_interval_minutes", 60), ]: if key not in config: config[key] = value @@ -417,7 +418,7 @@ async def main(): print() subprocess.run(["tmux", "kill-session", "-t", config["user"]]) subprocess.run(["tmuxp", "load", "-d", config["yaml_filepath"]]) - for i in range(3600, -1, -1): + for i in range(config["update_interval_minutes"] * 60, -1, -1): time.sleep(1) print(f"\rcountdown: {i} ", end=" ") print() From e57ae6df06e630c9927e4fa4be7fb241f72efa8e Mon Sep 17 00:00:00 2001 From: enarjord Date: Tue, 30 May 2023 23:27:52 +0200 Subject: [PATCH 2/2] add parameter update_interval_minutes --- configs/forager/example_config.hjson | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configs/forager/example_config.hjson b/configs/forager/example_config.hjson index 1fdef7f34..1c7efa04f 100644 --- a/configs/forager/example_config.hjson +++ b/configs/forager/example_config.hjson @@ -18,6 +18,9 @@ max_n_panes: 8 + // forager restarts bots every x minutes + update_interval_minutes: 60 + // Don't create bots with these symbols symbols_to_ignore: [ SYM1USDT