From 60092672b4b45667ef21073b3c43c062715ce486 Mon Sep 17 00:00:00 2001 From: OMGeeky Date: Tue, 23 Apr 2024 21:48:26 +0200 Subject: [PATCH] add max_items_to_process --- Cargo.toml | 2 +- src/lib.rs | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 8e085d2..727e122 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "twba-backup-config" -version = "0.1.5" +version = "0.1.6" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/src/lib.rs b/src/lib.rs index d2681f7..bb3e25c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -14,6 +14,11 @@ pub struct Conf { /// The folder where all the logs will be stored. #[config(default = "/var/tmp/twba/logs/")] pub log_folder: String, + /// How many items should be processed in a single run. + /// + /// After this number is reached the program will stop and wait for the next run. + #[config(default = 5)] + pub max_items_to_process: u64, #[config(nested)] pub twitch: Twitch,