Esempio n. 1
0
 public function testRecreate()
 {
     $data = 'data';
     $queue = 'test';
     $this->stomp->shouldReceive('send')->once()->with($queue, $data, []);
     $this->queue->recreate($data, $queue, 0);
 }
Esempio n. 2
0
 /**
  * Release a pushed job back onto the queue.
  *
  * @param  int  $delay
  * @return void
  */
 protected function recreateJob($delay)
 {
     $payload = json_decode($this->job->body, true);
     Arr::set($payload, 'attempts', Arr::get($payload, 'attempts', 1) + 1);
     $this->stomp->recreate(json_encode($payload), $this->getQueue(), $delay);
 }