You are here

function _drush_migrate_do_clear in Migrate 6

1 call to _drush_migrate_do_clear()
drush_migrate_clear in ./migrate.drush.inc
Clear one specified content set

File

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

Code

function _drush_migrate_do_clear($mcsid, $description, $options) {
  drush_log(dt("Clearing content set '!description'", array(
    '!description' => $description,
  )));
  $result = migrate_content_process_clear($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('Clearing 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;
  }
}