Same name in other branches
  1. 5.0.x advagg.drush.inc \drush_advagg_cron()
  2. 7.x-2.x advagg.drush.inc \drush_advagg_cron()
  3. 8.x-2.x advagg.drush.inc \drush_advagg_cron()
  4. 8.x-3.x advagg.drush.inc \drush_advagg_cron()
  5. 8.x-4.x advagg.drush.inc \drush_advagg_cron()

Callback function for drush advagg-cron.

Related topics

File

./advagg.drush.inc, line 155

Code

function drush_advagg_cron() {
    // Run AdvAgg cron job.
    $output = advagg_cron(TRUE);
    if (!empty($output['css']) || !empty($output['js'])) {
        \Drupal::logger(dt('All stale aggregates have been deleted. %css_count CSS files and %js_count JS files have been removed.', [
            '%css_count' => count($output['css']),
            '%js_count' => count($output['js']),
        ]), 'ok');
    }
    else {
        \Drupal::logger(dt('No stale aggregates found. Nothing was deleted.'), 'ok');
    }
}