From 8dad4e970bf8aa2aed9e59d10892576225ef23fa 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 Signed-off-by: Marcel de Rooy Signed-off-by: Katrin Fischer (cherry picked from commit 0feb10df7f9473c8ccd14bea947c0957a839e059) Signed-off-by: Fridolin Somers (cherry picked from commit b1efcf3d15680493828894b7c1c0cb9557be1cb8) Signed-off-by: Lucas Gass --- 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 d96205f1ff..c77c37473e 100755 --- a/misc/workers/background_jobs_worker.pl +++ b/misc/workers/background_jobs_worker.pl @@ -59,6 +59,7 @@ use Try::Tiny; use Pod::Usage; use Getopt::Long; use Parallel::ForkManager; +use Time::HiRes; use C4::Context; use Koha::Logger; @@ -134,6 +135,7 @@ while (1) { # nack to force requeue $conn->nack( { frame => $frame, requeue => 1 } ); + Time::HiRes::sleep(0.5); next; } $conn->ack( { frame => $frame } ); -- 2.20.1