[pbs-devel] [PATCH proxmox-backup 3/5] server/gc_job: add 'to_stdout'
Dominik Csapak
d.csapak at proxmox.com
Mon Nov 2 12:34:37 CET 2020
we will use this for the manual api call
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
src/bin/proxmox-backup-proxy.rs | 2 +-
src/server/gc_job.rs | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/bin/proxmox-backup-proxy.rs b/src/bin/proxmox-backup-proxy.rs
index 39254504..8d28aecb 100644
--- a/src/bin/proxmox-backup-proxy.rs
+++ b/src/bin/proxmox-backup-proxy.rs
@@ -329,7 +329,7 @@ async fn schedule_datastore_garbage_collection() {
let auth_id = Authid::backup_auth_id();
- if let Err(err) = crate::server::do_garbage_collection_job(job, datastore, auth_id, Some(event_str)) {
+ if let Err(err) = crate::server::do_garbage_collection_job(job, datastore, auth_id, Some(event_str), false) {
eprintln!("unable to start garbage collection job on datastore {} - {}", store, err);
}
}
diff --git a/src/server/gc_job.rs b/src/server/gc_job.rs
index dabbb237..0128a33e 100644
--- a/src/server/gc_job.rs
+++ b/src/server/gc_job.rs
@@ -14,6 +14,7 @@ pub fn do_garbage_collection_job(
datastore: Arc<DataStore>,
auth_id: &Authid,
schedule: Option<String>,
+ to_stdout: bool,
) -> Result<String, Error> {
let email = crate::server::lookup_user_email(auth_id.user());
@@ -25,7 +26,7 @@ pub fn do_garbage_collection_job(
&worker_type,
Some(store.clone()),
auth_id.clone(),
- false,
+ to_stdout,
move |worker| {
job.start(&worker.upid().to_string())?;
--
2.20.1
More information about the pbs-devel
mailing list