[pve-devel] [PATCH manager 2/3] jobs: started_job: rename variable to $msg

Fabian Ebner f.ebner at proxmox.com
Thu Nov 11 16:17:44 CET 2021


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

Signed-off-by: Fabian Ebner <f.ebner at 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






More information about the pve-devel mailing list