I have problem with queue in pheanstalk (version: 3.0.2). In queue is 0-10k jobs and sometimes I must search in data in this queue and add next jobs. So I want to add jobs that doesn't exist.
In the class Pheanstalk I don't see method that search in job and doesn't move this job to "current-jobs-reserved".
So I need fast method that only reads data in job without reserved.
My example:
public function searchId($id)
{
$pheanstalk = $this->getPhenstalk();
while ($job = $pheanstalk->reserveFromTube(self::TUBE)) {
$json = $job->getData();
$data = json_decode($json, true);
if($data['id'] == $id){
return true;
}
$pheanstalk->release($job);
}
return false;
}
But relase() need many time. How I can do it?