[pbs-devel] [PATCH v3 proxmox 1/7] pbs api types: add 'parallel-groups' to sync job config
Christian Ebner
c.ebner at proxmox.com
Tue Mar 18 13:24:17 CET 2025
Allow to specify the number of concurrent groups to be synchornized
by the sync job. Values can range from 1 to 8.
Signed-off-by: Christian Ebner <c.ebner at proxmox.com>
---
changes since version 2:
- Split off pbs api types into own patch, as it has been moved to
proxmox repo since.
pbs-api-types/src/jobs.rs | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/pbs-api-types/src/jobs.rs b/pbs-api-types/src/jobs.rs
index 04631d92..600ec8ed 100644
--- a/pbs-api-types/src/jobs.rs
+++ b/pbs-api-types/src/jobs.rs
@@ -64,6 +64,14 @@ pub const REMOVE_VANISHED_BACKUPS_SCHEMA: Schema = BooleanSchema::new(
.default(false)
.schema();
+const SYNC_PARALLEL_GROUPS_MAX: usize = 8;
+pub const SYNC_PARALLEL_GROUPS_SCHEMA: Schema =
+ IntegerSchema::new("Maximum number of groups to synchronzie in parallel for a sync jobs")
+ .minimum(1)
+ .maximum(SYNC_PARALLEL_GROUPS_MAX as isize)
+ .default(1)
+ .schema();
+
#[api(
properties: {
"next-run": {
@@ -585,6 +593,10 @@ pub const RESYNC_CORRUPT_SCHEMA: Schema =
type: SyncDirection,
optional: true,
},
+ "parallel-groups": {
+ schema: SYNC_PARALLEL_GROUPS_SCHEMA,
+ optional: true,
+ },
}
)]
#[derive(Serialize, Deserialize, Clone, Updater, PartialEq)]
@@ -622,6 +634,8 @@ pub struct SyncJobConfig {
pub resync_corrupt: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub sync_direction: Option<SyncDirection>,
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub parallel_groups: Option<usize>,
}
impl SyncJobConfig {
--
2.39.5
More information about the pbs-devel
mailing list