[pve-devel] [PATCH manager] api: replication job status: allow querying disabled jobs too

Fiona Ebner f.ebner at proxmox.com
Tue May 30 13:32:52 CEST 2023


Rather than failing with an error claiming that the job doesn't exist.
The disabled status will be visible in the result of the call.

Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
---
 PVE/API2/Replication.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/API2/Replication.pm b/PVE/API2/Replication.pm
index d70b4607..89c5a802 100644
--- a/PVE/API2/Replication.pm
+++ b/PVE/API2/Replication.pm
@@ -296,7 +296,7 @@ __PACKAGE__->register_method ({
 	my $rpcenv = PVE::RPCEnvironment::get();
 	my $authuser = $rpcenv->get_user();
 
-	my $jobs = PVE::ReplicationState::job_status();
+	my $jobs = PVE::ReplicationState::job_status(1);
 	my $jobid = $param->{id};
 	my $jobcfg = $jobs->{$jobid};
 
-- 
2.39.2






More information about the pve-devel mailing list