I'm not sure if this is correct, but I think you want to “remove” the task from the queue:
$job_id=Queue::push('DoTheJob', array('data'=>array(1,2,3)));
If(!someotherjobdone){
Queue::pop($job_id);
}
If this does not work, you can try:
$queue=Queue::getQueue($job_id);
Queue::pop($queue);
source
share