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

(-)a/Koha/BackgroundJob/BatchUpdateBiblioHoldsQueue.pm (-1 / +8 lines)
Lines 19-24 use Modern::Perl; Link Here
19
19
20
use Try::Tiny;
20
use Try::Tiny;
21
21
22
use Koha::BackgroundJobs;
22
use Koha::Biblios;
23
use Koha::Biblios;
23
use Koha::Exceptions;
24
use Koha::Exceptions;
24
25
Lines 134-139 sub enqueue { Link Here
134
135
135
    my @biblio_ids = @{ $args->{biblio_ids} };
136
    my @biblio_ids = @{ $args->{biblio_ids} };
136
137
138
    # If any given bib has a specific job already queued, we can skip this job. Limited to single bib jobs for performance.
139
    @biblio_ids = grep {
140
        Koha::BackgroundJobs->count( { type => $self->job_type, status => 'new', data => qq/{"biblio_ids":["$_"]}/ } )
141
            == 0
142
    } @biblio_ids;
143
    return unless @biblio_ids;
144
137
    $self->SUPER::enqueue(
145
    $self->SUPER::enqueue(
138
        {
146
        {
139
            job_size => scalar @biblio_ids,
147
            job_size => scalar @biblio_ids,
140
- 

Return to bug 41248