You are here

public static function AcquiaPurgeProcessorCron::isEnabled in Acquia Purge 7

Determine if the processor is enabled or not.

Overrides AcquiaPurgeProcessorInterface::isEnabled

File

lib/processor/AcquiaPurgeProcessorCron.php, line 16
Contains AcquiaPurgeProcessorCron.

Class

AcquiaPurgeProcessorCron
Processes the queue during hook_cron().

Code

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');
}