class AcquiaPurgeProcessorCron in Acquia Purge 7
Processes the queue during hook_cron().
Hierarchy
- class \AcquiaPurgeProcessorBase implements AcquiaPurgeProcessorInterface
- class \AcquiaPurgeProcessorCron implements AcquiaPurgeProcessorInterface
Expanded class hierarchy of AcquiaPurgeProcessorCron
File
- lib/
processor/ AcquiaPurgeProcessorCron.php, line 11 - Contains AcquiaPurgeProcessorCron.
View source
class AcquiaPurgeProcessorCron extends AcquiaPurgeProcessorBase implements AcquiaPurgeProcessorInterface {
/**
* {@inheritdoc}
*/
public static function isEnabled() {
// Don't load AcquiaPurgeProcessorCron when AcquiaPurgeProcessorRuntime is
// enabled as well, since this can lead to double processing during cron.
// Although running AcquiaPurgeService::process() twice during the same
// request won't harm because of the built-in capacity calculation, it would
// mean that the second run won't purge anything as the former already did.
// See Drupal.org issue #2292773.
if (_acquia_purge_variable('acquia_purge_lateruntime')) {
return FALSE;
}
return (bool) _acquia_purge_variable('acquia_purge_cron');
}
/**
* {@inheritdoc}
*/
public function getSubscribedEvents() {
return array(
'onCron',
);
}
/**
* Implements event onCron.
*
* @see acquia_purge_cron()
*/
public function onCron() {
$this
->processQueueChunk();
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
AcquiaPurgeProcessorBase:: |
protected | property | The Acquia Purge service object. | |
AcquiaPurgeProcessorBase:: |
protected | function | Attempt to process a chunk from the queue. | 1 |
AcquiaPurgeProcessorBase:: |
public | function | Construct a new AcquiaPurgeProcessorBase instance. | 2 |
AcquiaPurgeProcessorCron:: |
public | function |
Subscribe to the events this processor requires. Overrides AcquiaPurgeProcessorInterface:: |
|
AcquiaPurgeProcessorCron:: |
public static | function |
Determine if the processor is enabled or not. Overrides AcquiaPurgeProcessorInterface:: |
|
AcquiaPurgeProcessorCron:: |
public | function | Implements event onCron. |