Esempio n. 1
0
 /**
  * @see parent::resolveJobsForQueue()
  */
 public static function resolveJobsForQueue()
 {
     parent::resolveJobsForQueue();
     $pageSize = static::JOB_QUEUE_PAGE_SIZE;
     $offset = 0;
     $timeStamp = time();
     do {
         $queueModels = static::getModelsTResolveToJobQueue($pageSize, $offset, static::getType(), $timeStamp);
         $offset = $offset + $pageSize;
         if (is_array($queueModels) && count($queueModels) > 0) {
             foreach ($queueModels as $queueModel) {
                 InQueueUtil::resolveToAddJobToQueueAfterSaveOfModel($queueModel, static::getType());
             }
         }
     } while (is_array($queueModels) && count($queueModels) > 0);
 }