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

(-)a/misc/background_jobs_worker.pl (-2 / +10 lines)
Lines 119-126 while (1) { Link Here
119
    } else {
119
    } else {
120
        my $jobs = Koha::BackgroundJobs->search({ status => 'new', queue => \@queues });
120
        my $jobs = Koha::BackgroundJobs->search({ status => 'new', queue => \@queues });
121
        while ( my $job = $jobs->next ) {
121
        while ( my $job = $jobs->next ) {
122
            my $args = $job->json->decode($job->data);
122
            my $args = try {
123
                $job->json->decode($job->data);
124
            } catch {
125
                Koha::Logger->get->warn(sprintf "Cannot decode data for job id=%s", $job->id);
126
                $job->status('failed')->store;
127
            };
128
129
            next unless $args;
130
123
            process_job( $job, { job_id => $job->id, %$args } );
131
            process_job( $job, { job_id => $job->id, %$args } );
132
124
        }
133
        }
125
        sleep 10;
134
        sleep 10;
126
    }
135
    }
127
- 

Return to bug 32393