WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

ActionScheduler_QueueRunner::maybe_dispatch_async_request() public WC 1.0

Check if we should dispatch an async request to process actions.

Ищем WP-разработчика! Фулл-тайм, удаленка, хорошая зарплата, соц. пакет. Подробности.
Компания Boosta.

This method is attached to 'shutdown', so is called frequently. To avoid slowing down the site, it mitigates the work performed in each request by:

  1. checking if it's in the admin context and then
  2. haven't run on the 'shutdown' hook within the lock time (60 seconds by default)
  3. haven't exceeded the number of allowed batches.

The order of these checks is important, because they run from a check on a value:

  1. in memory - is_admin() maps to $GLOBALS or the WP_ADMIN constant
  2. in memory - transients use autoloaded options by default
  3. from a database query - has_maximum_concurrent_batches() run the query
    $this->store->get_claim_count() to find the current number of claims in the DB.

If all of these conditions are met, then we request an async runner check whether it should dispatch a request to process pending actions.

{} Это метод класса: ActionScheduler_QueueRunner{}

Хуков нет.

Возвращает

null. Ничего.

Использование

$ActionScheduler_QueueRunner = new ActionScheduler_QueueRunner();
$ActionScheduler_QueueRunner->maybe_dispatch_async_request();

Код ActionScheduler_QueueRunner::maybe_dispatch_async_request() WC 5.8.0

public function maybe_dispatch_async_request() {
	if ( is_admin() && ! ActionScheduler::lock()->is_locked( 'async-request-runner' ) ) {
		// Only start an async queue at most once every 60 seconds
		ActionScheduler::lock()->set( 'async-request-runner' );
		$this->async_request->maybe_dispatch();
	}
}