class PurgeQueueRunner in Purge 7.2
Use the Queue Runner Queue.
Uses the Queue Runner module to off load purges to a daemon, allowing continues and un-delayed purging.
Hierarchy
- class \Purge
- class \PurgeQueue
- class \PurgeQueueRunner implements PurgeDependable
- class \PurgeQueue
Expanded class hierarchy of PurgeQueueRunner
File
- includes/
purge.class.inc, line 451 - Contains all class and interface definitions for Purge.
View source
class PurgeQueueRunner extends PurgeQueue implements PurgeDependable {
public $queue = array();
/**
* Processes the queue.
*/
public function process() {
// Create a queuerunner task for each queue item.
$task = array();
$task['title'] = 'Purge Task';
$task['data'] = $this->queue;
queue_runner_add($task, 'purge_worker_callback');
}
/**
* Validates all depedencies.
*/
public function validate() {
$errors = array();
$pass = $this
->check_depend();
if (!$pass) {
$dependables = $this
->depends();
foreach ($dependable as $dependable_name => $dependable) {
if ($dependable['pass'] == 0) {
$errors[] = array(
'name' => $dependable_name,
'message' => $dependable['description'],
);
}
}
}
return $errors;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Purge:: |
public | property | ||
Purge:: |
public | property | ||
Purge:: |
public | property | ||
Purge:: |
public | property | ||
Purge:: |
public | property | ||
Purge:: |
public | property | ||
Purge:: |
public | property | ||
Purge:: |
public | property | ||
Purge:: |
public | function | Only serialize the static values. | 1 |
PurgeQueueRunner:: |
public | property | ||
PurgeQueueRunner:: |
public | function | Processes the queue. | |
PurgeQueueRunner:: |
public | function |
Validates all depedencies. Overrides Purge:: |