public function MigrationBase::endProcess in Migrate 6.2
Same name and namespace in other branches
- 7.2 includes/base.inc \MigrationBase::endProcess()
End a rollback or import process, releasing the semaphore. Note that it must be public to be callable as the shutdown function.
3 calls to MigrationBase::endProcess()
- Migration::endProcess in includes/
migration.inc - Override MigrationBase::endProcess, to call post hooks. Note that it must be public to be callable as the shutdown function.
- MigrationBase::processImport in includes/
base.inc - Perform an operation during the import phase
- MigrationBase::processRollback in includes/
base.inc - Perform an operation during the rollback phase.
1 method overrides MigrationBase::endProcess()
- Migration::endProcess in includes/
migration.inc - Override MigrationBase::endProcess, to call post hooks. Note that it must be public to be callable as the shutdown function.
File
- includes/
base.inc, line 793 - 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 endProcess() {
if ($this->previousErrorHandler) {
set_error_handler($this->previousErrorHandler);
$this->previousErrorHandler = NULL;
}
if ($this->processing) {
$this->status = MigrationBase::STATUS_IDLE;
$fields = array(
'class_name' => get_class($this),
'status' => MigrationBase::STATUS_IDLE,
);
db_merge('migrate_status')
->key(array(
'machine_name' => $this->machineName,
))
->fields($fields)
->execute();
// Complete the log record
if ($this->logHistory) {
try {
db_merge('migrate_log')
->key(array(
'mlid' => $this->logID,
))
->fields(array(
'endtime' => round(microtime(TRUE) * 1000),
'finalhighwater' => $this
->getHighwater(),
'numprocessed' => $this->total_processed,
))
->execute();
} catch (PDOException $e) {
Migration::displayMessage(t('Could not log operation on migration !name - possibly MigrationBase::beginProcess() was not called', array(
'!name' => $this->machineName,
)));
}
}
$this->processing = FALSE;
}
self::$currentMigration = NULL;
}