Processes the 'queueornext' stage of the export

@return bool whether or not to process the next stage. this is important as the control function is called recursively.
354683
public function process_stage_queueorwait() {
        global $DB;

        $wait = $this->instance->get_export_config('wait');
        if (empty($wait)) {
            $DB->set_field('portfolio_tempdata', 'queued', 1, array('id' => $this->id));
            $this->queued = true;
            return $this->process_stage_finished(true);
        }
        return true;
    }
668520
protected function doExecute()
    {
        $queues     = $this->io->getArguments();
        $options    = $this->getWorkOptions();
        $connection = $this->getOption('connection', null) ?: $this->console->get('queue.connection');

        // Set connection as default
        if ($connection !== null) {
            $this->console->set('queue.connection', $connection);
        }

        /** @var Worker $worker */
        $worker = $this->console->container->get('queue.worker');

        // Default Queues
        if (!count($queues)) {
            $queues = $this->console->container->get('queue.manager')
                ->getConnectionConfig($connection)
                ->get('queue');
        }

        $this->listenToWorker($worker);

        if ($this->getOption('once')) {
            $worker->runNextJob($queues, $options);
        } else {
            $worker->loop($queues, $options);
        }

        return true;
    }
497220
def _process_queue(self):
        '''
        
        '''
        if len(self._queue):
            args, kwargs = self._queue.popleft()
            self.publish(*args, **kwargs)
230218
public function processRequest()
    {
        if(!$this->canProcessRequest())
        {
            return false;
        }
        if(count($_FILES) > 0)
        {
            $this->readFromHttpData();
        }
        elseif(($this->sTempFile))
        {
            $this->readFromTempFile();
        }
        return true;
    }
1100396
public function process() {
        if ($this->progress >= self::PROGRESS_PROCESSED) {
            throw new restore_ui_exception('restoreuialreadyprocessed');
        }
        $this->progress = self::PROGRESS_PROCESSED;

        if (optional_param('previous', false, PARAM_BOOL) && $this->stage->get_stage() > self::STAGE_CONFIRM) {
            $this->stage = $this->initialise_stage($this->stage->get_prev_stage(), $this->stage->get_params());
            return false;
        }

        // Process the stage.
        $processoutcome = $this->stage->process();
        if ($processoutcome !== false && !($this->get_stage() == self::STAGE_PROCESS && optional_param('substage', false, PARAM_BOOL))) {
            $this->stage = $this->initialise_stage($this->stage->get_next_stage(), $this->stage->get_params());
        }

        // Process UI event after to check changes are valid.
        $this->controller->process_ui_event();
        return $processoutcome;
    }
983313
public function processQueue()
    {
        if (!$this->getAllowMultipleRegistrations()) {
            throw new \Exception('Queuing only allowed when there are multiple registrations');
        }

        // find the best candidate
        while ($this->callQueue->count() > 0) {
            $registration = NULL;

            if (strcasecmp($this->getInvokeType(), Registration::FIRST_REGISTRATION) === 0) {
                $registration = $this->getNextFirstRegistration();
            } else if (strcasecmp($this->getInvokeType(), Registration::LAST_REGISTRATION) === 0) {
                $registration = $this->getNextLastRegistration();
            } else if (strcasecmp($this->getInvokeType(), Registration::RANDOM_REGISTRATION) === 0) {
                $registration = $this->getNextRandomRegistration();
            } else if (strcasecmp($this->getInvokeType(), Registration::ROUNDROBIN_REGISTRATION) === 0) {
                $registration = $this->getNextRoundRobinRegistration();
            } else if (strcasecmp($this->getInvokeType(), Registration::THRUWAY_REGISTRATION) === 0) {
                $registration = $this->getNextThruwayRegistration();
            }

            if ($registration === NULL) {
                break;
            }
            $call = $this->callQueue->dequeue();
            $registration->processCall($call);
        }
    }
527923
protected function doProcess()
    {
        if ($this->getValue()) {
            $this->metas->add($this->toArray(), $this->getPosition());
            return true;
        }
        return false;
    }
121292
protected function doExecute()
    {
        $file = $this->console->get('path.temp') . '/queue/restart';

        File::write($file, Chronos::create($this->getOption('time'))->toUnix());

        $this->out('Sent restart signal to all workers.');

        return true;
    }
22600
public function process()
	{
		$context = $this->_getContext();
		$view = $this->getView();

		try
		{
			$view->stageParams = $this->_getParamStage( $view );

			parent::process();
		}
		catch( Client_Html_Exception $e )
		{
			$error = array( $this->_getContext()->getI18n()->dt( 'client/html', $e->getMessage() ) );
			$view->stageErrorList = $view->get( 'stageErrorList', array() ) + $error;
		}
		catch( Controller_Frontend_Exception $e )
		{
			$error = array( $this->_getContext()->getI18n()->dt( 'controller/frontend', $e->getMessage() ) );
			$view->stageErrorList = $view->get( 'stageErrorList', array() ) + $error;
		}
		catch( MShop_Exception $e )
		{
			$error = array( $this->_getContext()->getI18n()->dt( 'mshop', $e->getMessage() ) );
			$view->stageErrorList = $view->get( 'stageErrorList', array() ) + $error;
		}
		catch( Exception $e )
		{
			$context->getLogger()->log( $e->getMessage() . PHP_EOL . $e->getTraceAsString() );

			$error = array( $context->getI18n()->dt( 'client/html', 'A non-recoverable error occured' ) );
			$view->stageErrorList = $view->get( 'stageErrorList', array() ) + $error;
		}
	}
284890
public function processQueue()
    {
        //Set items to 0
        $this->totalItems = 0;

        //Set bulk sync limit
        $this->bulkSyncLimit = 5;

        //Set priority
        $this->_setPriority();

        //Check previous import status
        $this->_checkImportStatus();

        //Bulk priority. Process group 1 first
        foreach ($this->bulkPriority as $bulk) {
            if ($this->totalItems < $bulk['limit']) {
                $collection = $this->_getQueue(
                    $bulk['type'],
                    $bulk['mode'],
                    $bulk['limit'] - $this->totalItems
                );
                if ($collection->getSize()) {
                    $this->totalItems += $collection->getSize();
                    $bulkModel = $this->objectManager->create($bulk['model']);
                    $bulkModel->sync($collection);
                }
            }
        }

        //reset total items to 0
        $this->totalItems = 0;

        //Single/Update priority.
        foreach ($this->singlePriority as $single) {
            if ($this->totalItems < $single['limit']) {
                $collection = $this->_getQueue(
                    $single['type'],
                    $single['mode'],
                    $single['limit'] - $this->totalItems
                );
                if ($collection->getSize()) {
                    $this->totalItems += $collection->getSize();
                    $singleModel = $this->objectManager->create(
                        $single['model']
                    );
                    $singleModel->sync($collection);
                }
            }
        }
    }
1160715
public function process() {
		$job = $this->connection->pop();

		if ( ! $job ) {
			return false;
		}

		$exception = null;

		try {
			$job->handle();
		} catch ( Exception $exception ) {
			$job->release();
		}

		if ( $job->attempts() >= $this->attempts ) {
			if ( empty( $exception ) ) {
				$exception = new WorkerAttemptsExceededException();
			}
			
			$job->fail();
		}

		if ( $job->failed() ) {
			$this->connection->failure( $job, $exception );
		} else if ( $job->released() ) {
			$this->connection->release( $job );
		} else {
			$this->connection->delete( $job );
		}

		return true;
	}
622287
public function process()
    {
        foreach ($this->jobs as $id => $job) {
            // process the job
            $this->resolveJob($job['job'], json_encode($job['data']))->fire();
            // remove it from the processing queue
            unset($this->jobs[$id]);
        }
    }
1112777
public function process()
    {
        if (!$this->isInitialized()) {
            $this->init();
        }

        if ($this->getFirstAncestor('SwatForm') !== null) {
            $this->getCompositeWidget('check_all')->process();
        }

        $this->processed = true;

        if ($this->tile !== null) {
            $this->tile->process();
        }
    }
741094
public function process() {
        $this->promise = new Promise(function($r, $c, $n) {
            $this->resolve = $r;
            $this->createRejectFunction($c);
            $this->notify = $n;
            $this->executionCallback(null, true);
        });

        return $this->promise;
    }
798000
public function process()
    {
        $ret = call_user_func(
            $this->getConfig('callback'),
            $this->getQuery(),
            $this->getArgs(),
            $this
        );
        if ($ret === null) {
            return true;
        }

        return $ret;
    }
718855
protected function doProcess()
    {
        $links = $this->links;

        foreach ($this->getTouchArray() as $touchIcon) {
            $links->add($touchIcon);
        }

        foreach (['icon', 'shortcut icon'] as $rel) {
            $links->add(
                [
                    'rel'  => $rel,
                    'href' => $this->getFavicon()
                ]
            );
        }

        return true;
    }
221435
public function process()
    {
        parent::process();

        foreach ($this->children as $child) {
            if ($child !== null && !$child->isProcessed()) {
                $child->process();
            }
        }
    }