function drush_update_finished

8.0.x update.inc drush_update_finished($success, $results, $operations)
8.0.x update_7.inc drush_update_finished($success, $results, $operations)
6.x update.inc drush_update_finished($success, $results, $operations)
6.x update_7.inc drush_update_finished($success, $results, $operations)
7.x update.inc drush_update_finished($success, $results, $operations)
7.x update_7.inc drush_update_finished($success, $results, $operations)
3.x update_7.inc drush_update_finished($success, $results, $operations)
4.x update.inc drush_update_finished($success, $results, $operations)
5.x update.inc drush_update_finished($success, $results, $operations)
5.x update_7.inc drush_update_finished($success, $results, $operations)
master update.inc drush_update_finished($success, $results, $operations)
master update_7.inc drush_update_finished($success, $results, $operations)

Process and display any returned update output.

See also

\Drupal\system\Controller\DbUpdateController::batchFinished()

\Drupal\system\Controller\DbUpdateController::results()

3 string references to 'drush_update_finished'
drush_update_batch in commands/core/drupal/update.inc
Start the database update batch process.
drush_update_batch in commands/core/drupal/update_7.inc
Start the database update batch process.
entity_updates_main in commands/core/drupal/update.inc
Apply pending entity schema updates.

File

commands/core/drupal/update.inc, line 282
Update.php for provisioned sites. This file is a derivative of the standard drupal update.php, which has been modified to allow being run from the command line.

Code

function drush_update_finished($success, $results, $operations) {

  if (!drush_get_option('cache-clear', TRUE)) {
    drush_log(dt("Skipping cache-clear operation due to --cache-clear=0 option."), LogLevel::WARNING);
  }
  else {
    drupal_flush_all_caches();
  }

  foreach ($results as $module => $updates) {
    if ($module != '#abort') {
      foreach ($updates as $number => $queries) {
        foreach ($queries as $query) {
          // If there is no message for this update, don't show anything.
          if (empty($query['query'])) {
            continue;
          }

          if ($query['success']) {
            drush_log(strip_tags($query['query']));
          }
          else {
            drush_set_error(dt('Failed: ') . strip_tags($query['query']));
          }
        }
      }
    }
  }
}