original_string: public function pushBulk($jobs = [], $queue = self::QUEUE)
      {
          $ids = [];
          foreach ($jobs as $job) {
              if (!isset($job['class'])) {
                  throw new Exception('pushBulk: each job needs a job class');
              }
              if (!isset($job['args']) || !is_array($job['args'])) {
                  throw new Exception('pushBulk: each job needs args');
              }
  
              $retry = isset($job['retry']) ? $job['retry'] : true;
              $doAt = isset($job['at']) ? $job['at'] : null;
  
              $jobId = $this->idGenerator->generate();
              array_push($ids, $jobId);
              $this->atomicPush($jobId, $job['class'], $job['args'], $queue, $retry, $doAt);
          }
  
          return $ids;
      }
code: public function pushBulk($jobs = [], $queue = self::QUEUE)
      {
          $ids = [];
          foreach ($jobs as $job) {
              if (!isset($job['class'])) {
                  throw new Exception('pushBulk: each job needs a job class');
              }
              if (!isset($job['args']) || !is_array($job['args'])) {
                  throw new Exception('pushBulk: each job needs args');
              }
  
              $retry = isset($job['retry']) ? $job['retry'] : true;
              $doAt = isset($job['at']) ? $job['at'] : null;
  
              $jobId = $this->idGenerator->generate();
              array_push($ids, $jobId);
              $this->atomicPush($jobId, $job['class'], $job['args'], $queue, $retry, $doAt);
          }
  
          return $ids;
      }
code_tokens: public function pushBulk ( $ jobs = [ ] , $ queue = self :: QUEUE ) { $ ids = [ ] ; foreach ( $ jobs as $ job ) { if ( ! isset ( $ job [ 'class' ] ) ) { throw new Exception ( 'pushBulk: each job needs a job class' ) ; } if ( ! isset ( $ job [ 'args' ] ) || ! is_array ( $ job [ 'args' ] ) ) { throw new Exception ( 'pushBulk: each job needs args' ) ; } $ retry = isset ( $ job [ 'retry' ] ) ? $ job [ 'retry' ] : true ; $ doAt = isset ( $ job [ 'at' ] ) ? $ job [ 'at' ] : null ; $ jobId = $ this -> idGenerator -> generate ( ) ; array_push ( $ ids , $ jobId ) ; $ this -> atomicPush ( $ jobId , $ job [ 'class' ] , $ job [ 'args' ] , $ queue , $ retry , $ doAt ) ; } return $ ids ; }
docstring: Push multiple jobs to queue
  
  Format:
  $jobs = [
  [
  'class' => 'SomeClass',
  'args' => array(),
  'retry' => false,
  'at' => microtime(true)
  ]
  ];
  
  @param array  $jobs
  @param string $queue
  @return string
  @throws exception Exception
docstring_tokens: Push multiple jobs to queue