View | Details | Raw Unified | Return to bug 28445
Collapse All | Expand All

(-)a/Koha/BackgroundJob.pm (-2 / +3 lines)
Lines 17-22 package Koha::BackgroundJob; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
use JSON qw( decode_json encode_json );
19
use JSON qw( decode_json encode_json );
20
use Encode qw( encode_utf8 );
20
use Carp qw( croak );
21
use Carp qw( croak );
21
use Net::Stomp;
22
use Net::Stomp;
22
use Try::Tiny qw( catch try );
23
use Try::Tiny qw( catch try );
Lines 182-188 sub messages { Link Here
182
    my ( $self ) = @_;
183
    my ( $self ) = @_;
183
184
184
    my @messages;
185
    my @messages;
185
    my $data_dump = decode_json $self->data;
186
    my $data_dump = decode_json encode_utf8 $self->data;
186
    if ( exists $data_dump->{messages} ) {
187
    if ( exists $data_dump->{messages} ) {
187
        @messages = @{ $data_dump->{messages} };
188
        @messages = @{ $data_dump->{messages} };
188
    }
189
    }
Lines 199-205 Report of the job. Link Here
199
sub report {
200
sub report {
200
    my ( $self ) = @_;
201
    my ( $self ) = @_;
201
202
202
    my $data_dump = decode_json $self->data;
203
    my $data_dump = decode_json encode_utf8 $self->data;
203
    return $data_dump->{report} || {};
204
    return $data_dump->{report} || {};
204
}
205
}
205
206
(-)a/Koha/BackgroundJob/BatchUpdateItem.pm (-2 / +2 lines)
Lines 17-22 package Koha::BackgroundJob::BatchUpdateItem; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
use JSON qw( encode_json decode_json );
19
use JSON qw( encode_json decode_json );
20
use Encode qw( encode_utf8 );
20
use List::MoreUtils qw( uniq );
21
use List::MoreUtils qw( uniq );
21
use Try::Tiny;
22
use Try::Tiny;
22
23
Lines 138-144 sub process { Link Here
138
          if ( $_ =~ /Rollback failed/ );    # Rollback failed
139
          if ( $_ =~ /Rollback failed/ );    # Rollback failed
139
    };
140
    };
140
141
141
    my $job_data = decode_json $job->data;
142
    my $job_data = decode_json encode_utf8 $job->data;
142
    $job_data->{report} = $report;
143
    $job_data->{report} = $report;
143
144
144
    $job->ended_on(dt_from_string)->data( encode_json $job_data);
145
    $job->ended_on(dt_from_string)->data( encode_json $job_data);
145
- 

Return to bug 28445