From ef609cec8b1070ea88b7103e94599a79974d098b Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Fri, 19 Jan 2024 07:10:02 +0000 Subject: [PATCH] Bug 35819: Add simple delay Content-Type: text/plain; charset=utf-8 Here I add 500 ms. In my testing with the 1s sleep from the test plan, I might see one or two 'not found' lines. Obviously things depend on the time needed before the txn commits. But it will reduce a flood of these messages. Signed-off-by: Marcel de Rooy --- misc/workers/background_jobs_worker.pl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/misc/workers/background_jobs_worker.pl b/misc/workers/background_jobs_worker.pl index 49ad2e57e3..3b90827c55 100755 --- a/misc/workers/background_jobs_worker.pl +++ b/misc/workers/background_jobs_worker.pl @@ -58,6 +58,7 @@ use Try::Tiny; use Pod::Usage; use Getopt::Long; use Parallel::ForkManager; +use Time::HiRes; use C4::Context; use Koha::Logger; @@ -133,6 +134,7 @@ while (1) { # nack to force requeue $conn->nack( { frame => $frame, requeue => 1 } ); + Time::HiRes::sleep(0.5); next; } $conn->ack( { frame => $frame } ); -- 2.30.2