original_string: public function put($job, $options = null)
      {
          if ($job instanceof JobInterface) {
              if ($job->isRunOnce()) {
                  $cacheKey = self::CACHE_JOB . get_class($job);
                  if ($this->getCache()->get($cacheKey) === null) {
                      $expire = $job->getDelay() + $job->getTtr() + 60;
                      $this->getCache()->save($cacheKey, 1, $expire);
                  } else {
                      return true;
                  }
              }
              $options = [
                  'delay' => $job->getDelay(),
                  'ttr' => $job->getTtr(),
                  'priority' => $job->getPriority()
              ];
          }
          $this->getLogger()->info('Add job ' . json_encode($job));
          return parent::put($job, $options);
      }
code: public function put($job, $options = null)
      {
          if ($job instanceof JobInterface) {
              if ($job->isRunOnce()) {
                  $cacheKey = self::CACHE_JOB . get_class($job);
                  if ($this->getCache()->get($cacheKey) === null) {
                      $expire = $job->getDelay() + $job->getTtr() + 60;
                      $this->getCache()->save($cacheKey, 1, $expire);
                  } else {
                      return true;
                  }
              }
              $options = [
                  'delay' => $job->getDelay(),
                  'ttr' => $job->getTtr(),
                  'priority' => $job->getPriority()
              ];
          }
          $this->getLogger()->info('Add job ' . json_encode($job));
          return parent::put($job, $options);
      }
code_tokens: public function put ( $ job , $ options = null ) { if ( $ job instanceof JobInterface ) { if ( $ job -> isRunOnce ( ) ) { $ cacheKey = self :: CACHE_JOB . get_class ( $ job ) ; if ( $ this -> getCache ( ) -> get ( $ cacheKey ) === null ) { $ expire = $ job -> getDelay ( ) + $ job -> getTtr ( ) + 60 ; $ this -> getCache ( ) -> save ( $ cacheKey , 1 , $ expire ) ; } else { return true ; } } $ options = [ 'delay' => $ job -> getDelay ( ) , 'ttr' => $ job -> getTtr ( ) , 'priority' => $ job -> getPriority ( ) ] ; } $ this -> getLogger ( ) -> info ( 'Add job ' . json_encode ( $ job ) ) ; return parent :: put ( $ job , $ options ) ; }
docstring: Inserts jobs into the queue
  
  @param mixed $job JobInterface or any data
  @param array options
docstring_tokens: Inserts jobs into the queue