[pve-devel] [PATCH common v2 1/1] PBSClient: file_restore_list: add json-error and timeout parameter

Dominik Csapak d.csapak at proxmox.com
Tue Apr 26 12:13:59 CEST 2022


we always want the restore_list to use the json-error and timeout here.
Set the timeout to 25 seconds so there is a little headroom between
this and pveproxys 30s one.

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 src/PVE/PBSClient.pm | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/PVE/PBSClient.pm b/src/PVE/PBSClient.pm
index 21dc363..baedea6 100644
--- a/src/PVE/PBSClient.pm
+++ b/src/PVE/PBSClient.pm
@@ -343,10 +343,14 @@ sub status {
 
 sub file_restore_list {
     my ($self, $snapshot, $filepath, $base64) = @_;
+
+    my $params = [ $snapshot, $filepath, "--base64", $base64 ? 1 : 0,
+	'--json-error', 1, '--timeout', 25];
+
     return run_client_cmd(
 	$self,
 	"list",
-	[ $snapshot, $filepath, "--base64", $base64 ? 1 : 0 ],
+	$params,
 	0,
 	"proxmox-file-restore",
     );
-- 
2.30.2






More information about the pve-devel mailing list