ActionScheduler_AsyncRequest_QueueRunner::handle
Handle async requests
Run a queue, and maybe dispatch another async request to run another queue if there are still pending actions after completing a queue in this request.
Method of the class: ActionScheduler_AsyncRequest_QueueRunner{}
Hooks from the method
Returns
null. Nothing (null).
Usage
// protected - for code of main (parent) or child class $result = $this->handle();
ActionScheduler_AsyncRequest_QueueRunner::handle() ActionScheduler AsyncRequest QueueRunner::handle code WC 10.4.3
protected function handle() {
do_action( 'action_scheduler_run_queue', 'Async Request' ); // run a queue in the same way as WP Cron, but declare the Async Request context.
$sleep_seconds = $this->get_sleep_seconds();
if ( $sleep_seconds ) {
sleep( $sleep_seconds );
}
$this->maybe_dispatch();
}