You are here

function _drush_migrate_do_import in Migrate 6

1 call to _drush_migrate_do_import()
drush_migrate_import in ./migrate.drush.inc
Import one specified content set

File

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

Code

function _drush_migrate_do_import($mcsid, $description, $options) {
  drush_log(dt("Importing content set '!description'", array(
    '!description' => $description,
  )));
  if (drush_get_option('update')) {
    migrate_content_set_update($mcsid);
  }
  $result = migrate_content_process_import($mcsid, $options);
  switch ($result) {
    case MIGRATE_RESULT_IN_PROGRESS:
      drush_log(dt('Content set !content_set has an operation already in progress.', array(
        '!content_set' => $description,
      )), 'error');
      break;
    case MIGRATE_RESULT_STOPPED:
      drush_log(dt('Importing of content set !content_set stopped.', array(
        '!content_set' => $description,
      )), 'notice');
      break;
    case MIGRATE_RESULT_INCOMPLETE:

      // Most likely we are near the php memory_limit. Spawn a sub shell.
      drush_migrate_backend_invoke();
      break;
    case MIGRATE_RESULT_COMPLETED:
      break;
  }
}