Updated: Comment #0

Problem/Motivation

In comment 31 from #2160345-31: Clean up and test migrate executable and sql idmap, @catch mentioned:

+++ b/core/modules/migrate/lib/Drupal/migrate/MigrateExecutable.php
@@ -386,6 +394,12 @@ protected function timeOptionExceeded() {
+   *   The time limit, NULL if no limit or if the units were not in seconds.
When would the unit not be in seconds? Should that be an exception rather than null, or is it a valid case that we just don't care about here?

Proposed resolution

?

Remaining tasks

  • look into the units thing and decide when it might not be in seconds and what we should do if it is not.

User interface changes

No

API changes

No

Comments

mikeryan’s picture

In D7, you can run migrations through drush with a limit of either seconds:

drush mi Articles --limit="60 seconds"

or units:

drush mi Articles --limit="100 items"

In code, they're represented as array('unit' => 'seconds', 'value' => '60') or array('unit' => 'items', 'value' => '100');

The default, with a simple --limit=100, is items - in practice that's the more common scenario. Unfortunately, it seems like only the time limit has made it into the D8 version of migrate, but there's a vestige of the explicit 'unit' remaining. I would certainly like to see the item limit supported in the core API - that would be difficult to add in contrib.

ultimike’s picture

benjy’s picture

Status: Active » Closed (duplicate)

The issue is posed as a question and I think the answer/solution will come as part of #2282013: Add a row limit option to MigrateExecutable