From e79d70f84424ab1cc2d09b1694bfc09d79cbd6ae 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 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 Signed-off-by: Tomas Cohen Arazi --- 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 49ad2e57e34..3b90827c559 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.43.0