示例#1
0
 /**
  * Get the next job from the queue connection.
  *
  * @param  \Illuminate\Queue\Queue  $connection
  * @param  string  $queue
  * @return \Illuminate\Queue\Jobs\Job|null
  */
 protected function getNextJob($connection, $queue)
 {
     if (is_null($queue)) {
         return $connection->pop();
     }
     foreach (explode(',', $queue) as $queue) {
         if (!is_null($job = $connection->pop($queue))) {
             return $job;
         }
     }
 }