Execute deferred fields.

@return void
325431
protected function executeDeferred(): void
    {
        $this->result = app()->call(
            [$this->graphQL, 'executeRequest']
        );

        $this->stream->stream(
            $this->result,
            $this->resolved,
            empty($this->deferred)
        );

        $this->resolved = [];
    }
954877
private function wait()
    {
        do {
            if (empty($this->queries)) {
                break;
            }
            $links = $errors = $reject = [];
            foreach ($this->queries as $link) {
                $links[] = $errors[] = $reject[] = $link['l'];
            }
            if (!mysqli_poll($links, $errors, $reject, self::$sleep, self::$usleep)) {
                continue;
            }
            foreach ($this->queries as $l => $link) {
                $promise = $this->getPromise($link);
                $cnx    = $this->getConnection($link);
                try {
                    $result = $cnx->reap_async_query();
                    if ($result instanceof mysqli_result) {
                        $promise->resolve($result);
                    } else {
                        $errNo = mysqli_errno($cnx);
                        $errStr = mysqli_error($cnx);
                        if (0 !== $errNo || 0 !== strlen($errStr)) {
                            throw new mysqli_sql_exception($errStr, $errNo);
                        } else {
                            $promise->resolve($cnx);
                        }
                    }
                } catch (mysqli_sql_exception $e) {
                    $promise->reject($e);
                }
                $this->processed++;
                unset($this->queries[$l]);
            }
        } while ($this->processed < count($this->queries));
        $this->reset();
    }
384246
public function execute()
	{
		$sitecodes = (array) $this->{$this->fieldSite};
		$controllers = (array) $this->{$this->fieldController};
		$tsconfig = $this->{$this->fieldTSconfig};

		$conf = Base::parseTS( $tsconfig );
		Scheduler\Base::execute( $conf, $controllers, $sitecodes );

		return true;
	}
754874
public function execute()
    {
        $oModel = Factory::model(static::CONFIG_MODEL_NAME, static::CONFIG_MODEL_PROVIDER);

        /** @var Locale $oLocale */
        $oLocale        = Factory::service('Locale');
        $oDefaultLocale = $oLocale->getDefautLocale();

        $aFieldsDescribed = $oModel->describeFields();
        $aFields          = [];

        foreach ($aFieldsDescribed as $oField) {
            if (!in_array($oField->key, static::CONFIG_IGNORE_FIELDS)) {
                $aFields[] = $oField;
            }
        }

        for ($i = 0; $i < static::CONFIG_NUM_PER_SEED; $i++) {
            try {
                $aData = $this->generate($aFields);
                if (classUses($oModel, Localised::class)) {
                    if (!$oModel->create($aData, false, $oDefaultLocale)) {
                        throw new NailsException('Failed to create item. ' . $oModel->lastError());
                    }
                } elseif (!$oModel->create($aData)) {
                    throw new NailsException('Failed to create item. ' . $oModel->lastError());
                }
            } catch (\Exception $e) {
                echo "\nSEED ERROR: " . $e->getMessage();
            }
        }
    }
626192
public function execute() {
        global $DB;

        mtrace("\n  Cleaning up old question statistics cache records...", '');

        $expiretime = time() - 5 * HOURSECS;
        $DB->delete_records_select('question_statistics', 'timemodified < ?', [$expiretime]);
        $responseanlysisids = $DB->get_records_select_menu('question_response_analysis',
            'timemodified < ?',
            [$expiretime],
            'id',
            'id, id AS id2');
        $DB->delete_records_list('question_response_analysis', 'id', $responseanlysisids);
        $DB->delete_records_list('question_response_count', 'analysisid', $responseanlysisids);

        mtrace('done.');
    }
308533
public function execute() {
		$tasks = array();
		$this->TaskServer->killZombies();
		while ($this->TaskServer->freeSlots() > 0 && ($task = $this->TaskServer->getPending())) {
			$tasks[] = $task;
		}

		if (empty($tasks)) {
			return;
		}

		$events = (array)Configure::read('Task.processEvents');
		
		$models = array();
		foreach ($events as $event) {
			$models[$event['model']] = ClassRegistry::init($event['model']);
			CakeEventManager::instance()->attach($models[$event['model']], $event['key'], $event['options']);
		}

		foreach ($tasks as $task) {
			$this->_run($task);
		}

		foreach ($events as $event) {
			CakeEventManager::instance()->detach($models[$event['model']], $event['key'], $event['options']);
		}
	}
1032010
protected function _execute()
    {
        if (!$this->enabled() && !$this->focused()) {
            return;
        }
        foreach ($this->_children as $child) {
            if ($this->suite()->failfast()) {
                break;
            }
            $this->_passed = $child->process() && $this->_passed;
        }
    }
239596
protected function _resolve()
    {
        if (!$this->_deferred) {
            return;
        }
        $data = $this->_deferred;

        $instance = $data['instance'];
        $this->_not = $data['not'];
        $boolean = $instance->resolve();
        $data['description'] = $instance->description();
        $data['backtrace'] = $instance->backtrace();
        $this->_log($boolean, $data);

        $this->_deferred = null;
    }
413814
public function cleanupDeferredEventHandlers()
    {
        foreach ($this as $key => $property) {
            if ($property instanceof DeferredEvent) {
                $property->cleanup();
                $this->{$key} = null;
            }
        }
    }
762016
public function commit()
    {
        // Save deferred items
        $deferredItems = $this->getDeferredItems();

        foreach ($deferredItems as $deferredItem) {
            $this->save($deferredItem);
        }
    }
745335
public function loadBuffer(): void
    {
        if (self::$loaded) {
            return;
        }
        self::$loaded = true;

        foreach (self::$deferred as $class => $ids) {
            /** @var EntityRepository $repo */
            $repo = $this->registry->getRepository($class);
            $qb = $repo->createQueryBuilder('o', 'o.id');
            $entities = $qb->where($qb->expr()->in('o.id', array_values($ids)))
                           ->getQuery()
                           ->getResult();
            foreach ($entities as $entity) {
                if ($entity instanceof NodeInterface) {
                    self::$deferred[$class][$entity->getId()] = $entity;
                }
            }
        }
    }
386511
protected function prepare(): void
  {
    if (!$this->prepared)
    {
      $this->fieldSets->prepare('');

      $this->prepared = true;
    }
  }
1025905
public function process()
    {
        if (
            $this->getForm()->getHiddenField($this->id . '_submitted') === null
        ) {
            return;
        }

        parent::process();

        foreach ($this->values as $option_value) {
            $this->getEntryWidget($option_value)->process();
        }
    }
487774
public function execute() {
        global $CFG, $DB;

        if (!empty($CFG->gradehistorylifetime)) {
            $now = time();
            $histlifetime = $now - ($CFG->gradehistorylifetime * DAYSECS);
            $tables = [
                'grade_outcomes_history',
                'grade_categories_history',
                'grade_items_history',
                'grade_grades_history',
                'scale_history'
            ];
            foreach ($tables as $table) {
                if ($DB->delete_records_select($table, "timemodified < ?", [$histlifetime])) {
                    mtrace("    Deleted old grade history records from '$table'");
                }
            }
        }
    }
329713
public function execute()
    {
        $this->query("ALTER TABLE `{{NAILS_DB_PREFIX}}blog_post` ADD `commentsEnabled` TINYINT(1)  UNSIGNED  NOT NULL  DEFAULT '1'  AFTER `seo_keywords`;");
        $this->query("ALTER TABLE `{{NAILS_DB_PREFIX}}blog_post` ADD `commentsExpire` DATETIME  NULL  AFTER `commentsEnabled`;");
        $this->query("ALTER TABLE `{{NAILS_DB_PREFIX}}blog_post` ADD `type` ENUM('TEXT','AUDIO','VIDEO','PHOTO')  NOT NULL  DEFAULT 'PHOTO'  AFTER `slug`;");
        $this->query("ALTER TABLE `{{NAILS_DB_PREFIX}}blog_post` ADD `video_url` VARCHAR(255)  NULL  DEFAULT NULL  AFTER `image_id`;");
        $this->query("ALTER TABLE `{{NAILS_DB_PREFIX}}blog_post` ADD `audio_url` VARCHAR(255)  NULL  DEFAULT NULL  AFTER `video_url`;");
        $this->query("UPDATE `{{NAILS_DB_PREFIX}}blog_post` SET type = 'TEXT' WHERE image_id IS NULL;");
    }
1351052
protected function executeCallbacks()
	{
		if ($this->callbacks_executed) {
			return;
		}
		
		$this->callbacks_executed = true;
		
		foreach ($this->callbacks as $callback) {
			if ($q = call_user_func($callback, $this->query)) {
				$this->query = $q;
			}
		}
	}
1370592
public function execute() {

        // Find section_included_setting
        if (!$this->get_setting_value('included')) {
            $this->log('section skipped by _included setting', backup::LOG_DEBUG, $this->name);

        } else { // Setting tells us it's ok to execute
            parent::execute();
        }
    }