0

I have made a Migration that i run with Cron. My highwater field is the date changed, which is present in the XML (source) document. Then I do this in my cron function:

 $result = $migration->prepareUpdate();
 $result = $migration->processImport();

Problem is is this will update ALL nodes from the XML. I would like to only update those that have been changed, according to their modifiedAt date. If I just do:

 $result = $migration->processImport();

Then nothing at all updates. I think processImport() would work if it were just about importing new items, but I also need to update any existing items that have changed. The ones that don't need updating can be skipped, of course. Is there another method I could call here? Is there a way I need to set up some kind of prepareRow to mark items as needing updating?

0

The recommended way to do what you are trying to do is with drush. Is drush available to you? if so have cron execute a drush mi command. See https://drupal.org/node/1561820. Also make sure your highwater mark is set up correctly. See https://drupal.org/node/1223936.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.