You are here

public function MigrationBase::stopProcess in Migrate 7.2

Same name and namespace in other branches
  1. 6.2 includes/base.inc \MigrationBase::stopProcess()

Signal that any current import or rollback process should end itself at the earliest opportunity

File

includes/base.inc, line 1071
Defines the base class for migration processes.

Class

MigrationBase
The base class for all objects representing distinct steps in a migration process. Most commonly these will be Migration objects which actually import data from a source into a Drupal destination, but by deriving classes directly from MigrationBase…

Code

public function stopProcess() {

  // Do not change the status of an idle migration
  db_update('migrate_status')
    ->fields(array(
    'status' => MigrationBase::STATUS_STOPPING,
  ))
    ->condition('machine_name', $this->machineName)
    ->condition('status', MigrationBase::STATUS_IDLE, '<>')
    ->execute();
}