[pbs-devel] [PATCH proxmox v4 1/3] pbs-api-types: add schema for {worker, read, verify}-threads
Nicolas Frey
n.frey at proxmox.com
Thu Nov 13 10:31:07 CET 2025
Add seperate schemas for read and verify thread count to use in
chunk verification. Also add worker-threads for use in
`TapeBackupJobSetup`.
Signed-off-by: Nicolas Frey <n.frey at proxmox.com>
---
pbs-api-types/src/jobs.rs | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/pbs-api-types/src/jobs.rs b/pbs-api-types/src/jobs.rs
index 4dbbef2b..75e20992 100644
--- a/pbs-api-types/src/jobs.rs
+++ b/pbs-api-types/src/jobs.rs
@@ -64,6 +64,27 @@ pub const REMOVE_VANISHED_BACKUPS_SCHEMA: Schema = BooleanSchema::new(
.default(false)
.schema();
+const fn threads_schema(description: &'static str, default: i64) -> Schema {
+ IntegerSchema::new(description)
+ .minimum(1)
+ .maximum(32)
+ .default(default)
+ .schema()
+}
+
+pub const TAPE_JOB_THREADS_SCHEMA: Schema =
+ threads_schema("The number of threads to use for the tape backup job.", 1);
+
+pub const VERIFY_JOB_READ_THREADS_SCHEMA: Schema = threads_schema(
+ "The number of threads to use for reading chunks in verify job.",
+ 1,
+);
+
+pub const VERIFY_JOB_VERIFY_THREADS_SCHEMA: Schema = threads_schema(
+ "The number of threads to use for verifying chunks in verify job.",
+ 4,
+);
+
#[api(
properties: {
"next-run": {
--
2.47.3
More information about the pbs-devel
mailing list