Tribe__Process__Queue::stop_queue( string $queue_id )

Stops a queue that might be running.

The queue process results are not rolled back (e.g. 200 posts to create, stopped after 50, those 50 posts will persist).

See also


Top ↑

Parameters

$queue_id

(string) (Required) The unique identifier of the queue that should be stopped.


Top ↑

Return

(bool) Whether the queue was correctly stopped, and its information deleted, or not.


Top ↑

Source

File: src/Tribe/Process/Queue.php

	public static function stop_queue( $queue_id ) {
		$meta = (array) get_transient( $queue_id . '_meta' );
		delete_transient( $queue_id . '_meta' );

		if ( ! empty( $meta['identifier'] ) ) {
			delete_site_transient( $meta['identifier'] . '_process_lock' );
		}

		return delete_site_option( $queue_id );
	}

Top ↑

Changelog

Changelog
Version Description
4.7.12 Introduced.