book specifically same jobs which were seen

This commit is contained in:
Oliver Gorwits
2014-04-24 23:13:20 +01:00
parent 0d97c2b819
commit fdeeffcbe4

View File

@@ -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 ];
}