public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-backup 1/1] adapt compute_next_event to new signature
Date: Wed,  1 Dec 2021 09:45:07 +0100	[thread overview]
Message-ID: <20211201084507.1510270-3-d.csapak@proxmox.com> (raw)
In-Reply-To: <20211201084507.1510270-1-d.csapak@proxmox.com>

the 'utc' flag is now contained in the event itself and not given
as a flag to 'compute_next_event' anymore

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 src/bin/proxmox-backup-proxy.rs | 4 ++--
 src/server/jobstate.rs          | 2 +-
 src/tape/inventory.rs           | 2 +-
 src/tape/media_pool.rs          | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/bin/proxmox-backup-proxy.rs b/src/bin/proxmox-backup-proxy.rs
index 16ae67bb..07a53687 100644
--- a/src/bin/proxmox-backup-proxy.rs
+++ b/src/bin/proxmox-backup-proxy.rs
@@ -585,7 +585,7 @@ async fn schedule_datastore_garbage_collection() {
             }
         };
 
-        let next = match event.compute_next_event(last, false) {
+        let next = match event.compute_next_event(last) {
             Ok(Some(next)) => next,
             Ok(None) => continue,
             Err(err) => {
@@ -1040,7 +1040,7 @@ fn check_schedule(worker_type: &str, event_str: &str, id: &str) -> bool {
         }
     };
 
-    let next = match event.compute_next_event(last, false) {
+    let next = match event.compute_next_event(last) {
         Ok(Some(next)) => next,
         Ok(None) => return false,
         Err(err) => {
diff --git a/src/server/jobstate.rs b/src/server/jobstate.rs
index f874725a..25fb2f9b 100644
--- a/src/server/jobstate.rs
+++ b/src/server/jobstate.rs
@@ -341,7 +341,7 @@ pub fn compute_schedule_status(
     if let Some(schedule) = schedule {
         if let Ok(event) = schedule.parse::<CalendarEvent>() {
             // ignore errors
-            status.next_run = event.compute_next_event(last, false).unwrap_or(None);
+            status.next_run = event.compute_next_event(last).unwrap_or(None);
         }
     }
 
diff --git a/src/tape/inventory.rs b/src/tape/inventory.rs
index 1f0b41f8..c76e50cd 100644
--- a/src/tape/inventory.rs
+++ b/src/tape/inventory.rs
@@ -533,7 +533,7 @@ impl Inventory {
                         set_start_time
                     }
                     MediaSetPolicy::CreateAt(ref event) => {
-                        match event.compute_next_event(set_start_time, false) {
+                        match event.compute_next_event(set_start_time) {
                             Ok(Some(next)) => next,
                             Ok(None) | Err(_) => return i64::MAX,
                         }
diff --git a/src/tape/media_pool.rs b/src/tape/media_pool.rs
index 70713cc3..6a947b22 100644
--- a/src/tape/media_pool.rs
+++ b/src/tape/media_pool.rs
@@ -290,7 +290,7 @@ impl MediaPool {
                 }
                 MediaSetPolicy::CreateAt(event) => {
                     if let Some(set_start_time) = self.inventory.media_set_start_time(&self.current_media_set.uuid()) {
-                        if let Ok(Some(alloc_time)) = event.compute_next_event(set_start_time as i64, false) {
+                        if let Ok(Some(alloc_time)) = event.compute_next_event(set_start_time as i64) {
                             if current_time >= alloc_time {
                                 create_new_set = Some(String::from("policy CreateAt event triggered"));
                             }
-- 
2.30.2





  parent reply	other threads:[~2021-12-01  8:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-01  8:45 [pbs-devel] [PATCH proxmox/proxmox-backup] add 'UTC' to calendarevent syntax Dominik Csapak
2021-12-01  8:45 ` [pbs-devel] [PATCH proxmox 1/1] proxmox-time: calendar-events: parse 'UTC' timezone into calendarevent Dominik Csapak
2021-12-02  9:41   ` [pbs-devel] applied: " Dietmar Maurer
2021-12-01  8:45 ` Dominik Csapak [this message]
2021-12-02  9:41   ` [pbs-devel] applied: [PATCH proxmox-backup 1/1] adapt compute_next_event to new signature Dietmar Maurer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211201084507.1510270-3-d.csapak@proxmox.com \
    --to=d.csapak@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal