Bug 35819: (QA follow-up) Prevent warning on uninitialized retries count

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Marcel de Rooy 2024-02-05 11:13:15 +00:00 committed by Katrin Fischer
parent 7c1d4716be
commit c86e6ee82d
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
2 changed files with 4 additions and 2 deletions

View File

@ -146,7 +146,8 @@ while (1) {
}
unless ($job) {
if ( ++$not_found_retries->{$args->{job_id}} >= $max_retries ) {
$not_found_retries->{ $args->{job_id} } //= 0;
if ( ++$not_found_retries->{ $args->{job_id} } >= $max_retries ) {
Koha::Logger->get( { interface => 'worker' } )
->warn( sprintf "Job %s not found, no more retry", $args->{job_id} );

View File

@ -143,7 +143,8 @@ while (1) {
}
unless ($job) {
if ( ++$not_found_retries->{$args->{job_id}} >= $max_retries ) {
$not_found_retries->{ $args->{job_id} } //= 0;
if ( ++$not_found_retries->{ $args->{job_id} } >= $max_retries ) {
Koha::Logger->get( { interface => 'worker' } )
->warn( sprintf "Job %s not found, no more retry", $args->{job_id} );