You are here

function drush_migrate_stop in Migrate 6.2

Same name and namespace in other branches
  1. 6 migrate.drush.inc \drush_migrate_stop()
  2. 7.2 migrate.drush.inc \drush_migrate_stop()

File

./migrate.drush.inc, line 1187
Drush support for the migrate module

Code

function drush_migrate_stop($args = NULL) {
  try {
    $migrations = drush_migrate_get_migrations($args);
    foreach ($migrations as $migration) {
      drush_log(dt("Stopping '!description' migration", array(
        '!description' => $migration
          ->getMachineName(),
      )));
      $migration
        ->stopProcess();
    }
  } catch (MigrateException $e) {
    drush_print($e
      ->getMessage());
    exit;
  }
}