]> git.proxmox.com Git - pve-manager.git/commitdiff
jobs: started_job: rename variable to $msg
authorFabian Ebner <f.ebner@proxmox.com>
Thu, 11 Nov 2021 15:17:44 +0000 (16:17 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 11 Nov 2021 20:04:34 +0000 (21:04 +0100)
it's not always an error, but can also be 'OK'.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
PVE/Jobs.pm

index 2fe197d26d57ce4011b9c460e8285ded54bf8e1c..bfccf7f18f0d4389903c34635a8a21d18a538153 100644 (file)
@@ -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 {