From f62e28e4d0ec9b36ee64edd18bd45b53bcfcee32 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Fri, 8 Mar 2024 07:56:46 +0000 Subject: [PATCH] Bug 33898: (follow-up) Apply same solution to es_indexer_daemon Content-Type: text/plain; charset=utf-8 Test plan: Similar as first patch with Elastic index jobs. --- misc/workers/es_indexer_daemon.pl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/misc/workers/es_indexer_daemon.pl b/misc/workers/es_indexer_daemon.pl index 9e900b7195..3da8f28ee0 100755 --- a/misc/workers/es_indexer_daemon.pl +++ b/misc/workers/es_indexer_daemon.pl @@ -69,6 +69,7 @@ my ( $help, $batch_size ); my $not_found_retries = {}; my $max_retries = $ENV{MAX_RETRIES} || 10; +my $mq_timeout = $ENV{MQ_TIMEOUT} // 10; GetOptions( 'h|help' => \$help, @@ -111,9 +112,10 @@ my @jobs = (); while (1) { if ( $conn ) { - my $frame = $conn->receive_frame; + my $frame = $conn->receive_frame( { timeout => $mq_timeout } ); if ( !defined $frame ) { - # maybe log connection problems + # timeout or connection issue? + $pm->reap_finished_children; next; # will reconnect automatically } -- 2.30.2