From fdeeffcbe4f6f4b997d22d8aaa60fe0070c723e5 Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Thu, 24 Apr 2014 23:13:20 +0100 Subject: [PATCH] book specifically same jobs which were seen --- Netdisco/lib/App/Netdisco/Daemon/LocalQueue.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Netdisco/lib/App/Netdisco/Daemon/LocalQueue.pm b/Netdisco/lib/App/Netdisco/Daemon/LocalQueue.pm index c3a45df1..f3ef561f 100644 --- a/Netdisco/lib/App/Netdisco/Daemon/LocalQueue.pm +++ b/Netdisco/lib/App/Netdisco/Daemon/LocalQueue.pm @@ -43,7 +43,8 @@ sub take_jobs { return [] if scalar @rows == 0; debug sprintf "booking out %s jobs to worker %s", (scalar @rows), $wid; - $rs->update({wid => $wid}); + $queue->search({job => { -in => [map {$_->job} @rows] }}) + ->update({wid => $wid}); return [ map {{$_->get_columns}} @rows ]; }