Exemplo n.º 1
0
 /**
  * 
  */
 public function release($delay = null, $type = 'minutes')
 {
     parent::release($delay);
     if (!empty($delay)) {
         if ($type == 'hours') {
             $delay = \Carbon\Carbon::now()->addHours($delay);
         }
         if ($type == 'minutes') {
             $delay = \Carbon\Carbon::now()->addMinutes($delay);
         }
     }
     $this->job->available_at = empty($delay) ? \Carbon\Carbon::now()->addSeconds(15) : $delay;
     $this->job->status = Job::STATUS_WAITING;
     $this->repeat = true;
 }
Exemplo n.º 2
0
 /**
  * Delete the job from the queue.
  *
  * @return void
  */
 public function delete()
 {
     parent::delete();
     $this->job->delete();
 }