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

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