From 8c82a7fe4573a34f43e2aaa77790dbbf19f6c7c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20=27Rengyr=27=20Kos=C3=ADk?= Date: Mon, 28 Oct 2024 20:08:23 +0100 Subject: [PATCH] Change retry time in case of failure to be set in config --- config.json | 3 ++- src/main.rs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/config.json b/config.json index a98b2de..094334e 100644 --- a/config.json +++ b/config.json @@ -7,5 +7,6 @@ "tags": "#Bot //optional setting", "local_path": "./ //optional setting for local images", "log_level": "Info", - "use_syslog_style": true + "use_syslog_style": true, + "retry_time": 600 } \ No newline at end of file diff --git a/src/main.rs b/src/main.rs index c13fe7e..fec945a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -953,7 +953,7 @@ fn main() { //Check if it's time to post new image if next_time < Local::now() - || (failed_to_post && (Instant::now() - failed_to_post_time).as_secs() > 60 * 10) + || (failed_to_post && (Instant::now() - failed_to_post_time).as_secs() > 60 * 2) // Try again in 2 minutes if posting failed { //Try again after 10min if failed let image = post_image(&app_config, &images, &mut not_used_images);