You are here

public static function MigrateUpgradeRunBatch::onPostRowSave in Migrate Upgrade 8

Reacts to item import.

Parameters

\Drupal\migrate\Event\MigratePostRowSaveEvent $event: The post-save event.

File

src/MigrateUpgradeRunBatch.php, line 311
Contains \Drupal\migrate_upgrade\MigrateUpgradeRunBatch.

Class

MigrateUpgradeRunBatch
Runs a single migration batch.

Namespace

Drupal\migrate_upgrade

Code

public static function onPostRowSave(MigratePostRowSaveEvent $event) {

  // We want to interrupt this batch and start a fresh one.
  if (time() - REQUEST_TIME > static::$maxExecTime) {
    $event
      ->getMigration()
      ->interruptMigration(MigrationInterface::RESULT_INCOMPLETE);
  }
}