]> git.proxmox.com Git - pve-storage.git/blobdiff - PVE/API2/Storage/Status.pm
status: remove sleep(1) in file upload
[pve-storage.git] / PVE / API2 / Storage / Status.pm
index fd82e538c2ce21f06ed57ae534b8da95130f4071..e12b62a5eb70282bdb28f0a6c507240f494127f6 100644 (file)
@@ -498,14 +498,7 @@ __PACKAGE__->register_method ({
            print "finished file import successfully\n";
        };
 
-       my $upid = $rpcenv->fork_worker('imgcopy', undef, $user, $worker);
-
-       # apache removes the temporary file on return, so we need
-       # to wait here to make sure the worker process starts and
-       # opens the file before it gets removed.
-       sleep(1);
-
-       return $upid;
+       return $rpcenv->fork_worker('imgcopy', undef, $user, $worker);
    }});
 
 __PACKAGE__->register_method({