public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Fabian Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager 2/3] jobs: started_job: rename variable to $msg
Date: Thu, 11 Nov 2021 16:17:44 +0100	[thread overview]
Message-ID: <20211111151745.130818-3-f.ebner@proxmox.com> (raw)
In-Reply-To: <20211111151745.130818-1-f.ebner@proxmox.com>

it's not always an error, but can also be 'OK'.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
---
 PVE/Jobs.pm | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/PVE/Jobs.pm b/PVE/Jobs.pm
index 2fe197d2..bfccf7f1 100644
--- a/PVE/Jobs.pm
+++ b/PVE/Jobs.pm
@@ -155,17 +155,18 @@ sub starting_job {
 }
 
 sub started_job {
-    my ($jobid, $type, $upid, $err) = @_;
+    my ($jobid, $type, $upid, $msg) = @_;
+
     lock_job_state($jobid, $type, sub {
 	my $state = read_job_state($jobid, $type);
 	return if !defined($state); # job was removed, do not update
 	die "unexpected state '$state->{state}'\n" if $state->{state} ne 'starting';
 
 	my $new_state;
-	if (defined($err)) {
+	if (defined($msg)) {
 	    $new_state = {
 		state => 'stopped',
-		msg => $err,
+		msg => $msg,
 		time => time(),
 	    };
 	} else {
-- 
2.30.2





  parent reply	other threads:[~2021-11-11 15:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-11 15:17 [pve-devel] [PATCH-SERIES manager] small cleanups for scheduler/jobs Fabian Ebner
2021-11-11 15:17 ` [pve-devel] [PATCH manager 1/3] pvescheduler: simplify code for sleep time calculation Fabian Ebner
2021-11-11 15:17 ` Fabian Ebner [this message]
2021-11-11 15:17 ` [pve-devel] [PATCH manager 3/3] jobs: rename function to better distinguish job state and task status Fabian Ebner
2021-11-11 20:06 ` [pve-devel] applied-series: [PATCH-SERIES manager] small cleanups for scheduler/jobs Thomas Lamprecht

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=20211111151745.130818-3-f.ebner@proxmox.com \
    --to=f.ebner@proxmox.com \
    --cc=pve-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