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

(-)a/misc/workers/es_indexer_daemon.pl (-2 / +15 lines)
Lines 151-156 sub commit { Link Here
151
151
152
    my @bib_records;
152
    my @bib_records;
153
    my @auth_records;
153
    my @auth_records;
154
155
    my $jobs = Koha::BackgroundJobs->search( { id => [ map { $_->id } @jobs ] });
156
    # Start
157
    $jobs->update({
158
        progress => 0,
159
        status => 'started',
160
        started_on => \'NOW()',
161
    });
162
154
    for my $job (@jobs) {
163
    for my $job (@jobs) {
155
        my $args = try {
164
        my $args = try {
156
            $job->json->decode( $job->data );
165
            $job->json->decode( $job->data );
Lines 182-186 sub commit { Link Here
182
        };
191
        };
183
    }
192
    }
184
193
185
    Koha::BackgroundJobs->search( { id => [ map { $_->id } @jobs ] } )->update( { status => 'finished', progress => 1 }, { no_triggers => 1 } );
194
    # Finish
195
    $jobs->update({
196
        progress => 1,
197
        status => 'finished',
198
        ended_on => \'NOW()',
199
    });
186
}
200
}
187
- 

Return to bug 32594