[pve-devel] [PATCH pve-manager 15/18] PVE::Replication::remote_prepare_local_job - new helper

Dietmar Maurer dietmar at proxmox.com
Mon May 29 12:05:12 CEST 2017


> > +sub remote_prepare_local_job {
> > +    my ($ssh_info, $jobid, $vmid, $volumes, $last_sync) = @_;
> > +
> > +    my $ssh_cmd = PVE::Cluster::ssh_info_to_command($ssh_info);
> > +    my $cmd = [@$ssh_cmd, '--', 'pvesr', 'prepare-local-job', $jobid,
> > +	       $vmid, @$volumes, '--last_sync', $last_sync];
> > +
> > +    my $remote_snapshots;
> > +
> > +    my $parser = sub {
> > +	my $line = shift;
> > +	$remote_snapshots = JSON::decode_json($line);
> 
> which was 'print to_json($something)' on the other side - IMHO the other
> side should use encode_json, but if not, this one here should use
> from_json I guess?

I never run into troubles with decode_json.




More information about the pve-devel mailing list