]> git.proxmox.com Git - pve-container.git/commitdiff
api/create: trivial: move worker name out
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Sat, 26 Jan 2019 13:28:00 +0000 (14:28 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Sat, 26 Jan 2019 13:28:00 +0000 (14:28 +0100)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/PVE/API2/LXC.pm

index 042448d37e8dd7832dda36335cb6c5d7311d6a56..2ab98da776ad1e875aceaf3bc75a167c57683c63 100644 (file)
@@ -439,13 +439,12 @@ __PACKAGE__->register_method({
                if $start_after_create;
        };
 
+       my $workername = $restore ? 'vzrestore' : 'vzcreate';
        my $realcmd = sub { PVE::LXC::Config->lock_config($vmid, $code); };
 
        &$check_vmid_usage(); # first check before locking
 
-       return $rpcenv->fork_worker($restore ? 'vzrestore' : 'vzcreate',
-                                   $vmid, $authuser, $realcmd);
-
+       return $rpcenv->fork_worker($workername, $vmid, $authuser, $realcmd);
     }});
 
 __PACKAGE__->register_method({