[pbs-devel] [PATCH proxmox-backup 1/6] api: admin: sync: add direction to sync job status
Dominik Csapak
d.csapak at proxmox.com
Mon Nov 25 12:15:32 CET 2024
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
pbs-api-types/src/jobs.rs | 6 ++++++
src/api2/admin/sync.rs | 1 +
2 files changed, 7 insertions(+)
diff --git a/pbs-api-types/src/jobs.rs b/pbs-api-types/src/jobs.rs
index 52520811b..e18197fb1 100644
--- a/pbs-api-types/src/jobs.rs
+++ b/pbs-api-types/src/jobs.rs
@@ -660,6 +660,9 @@ impl SyncJobConfig {
status: {
type: JobScheduleStatus,
},
+ direction: {
+ type: SyncDirection,
+ },
},
)]
#[derive(Serialize, Deserialize, Clone, PartialEq)]
@@ -670,6 +673,9 @@ pub struct SyncJobStatus {
pub config: SyncJobConfig,
#[serde(flatten)]
pub status: JobScheduleStatus,
+
+ /// The direction of the job
+ pub direction: SyncDirection,
}
/// These are used separately without `ns`/`max-depth` sometimes in the API, specifically in the API
diff --git a/src/api2/admin/sync.rs b/src/api2/admin/sync.rs
index 3a41aa2c7..479f1a958 100644
--- a/src/api2/admin/sync.rs
+++ b/src/api2/admin/sync.rs
@@ -84,6 +84,7 @@ pub fn list_config_sync_jobs(
list.push(SyncJobStatus {
config: job,
status,
+ direction: sync_direction,
});
}
--
2.39.5
More information about the pbs-devel
mailing list