Drupal Answers Asked by blablazo on November 8, 2021
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?
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.
Answered by pferlito on November 8, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP