I have two Feeds importers that need to run in a specific order. For example:
1) Importer 'Films' imports all the films showing at a cinema, creating 'film' nodes.
2) Importer 'Showtimes' imports the show times for each film, creating 'showtime' nodes.
Both importers are scheduled to run every day. 'Showtimes' must always run after 'Films' is fully imported, as it creates node references to film nodes.
Things I have tried:
Using Rules instead of Job Scheduler. I created a custom rules action using this code:
while (FEEDS_BATCH_COMPLETE != feeds_source('my_importer_id', $node->nid)->import());
I created a rule that triggers on cron with two actions: import films, import showtimes. This kind of works but when I look at the newly created nodes, showtime nodes are being generated before all the film nodes are created. So I guess rules actions aren't processed sequentially...?
Using Feeds Rules to chain one import onto another. Feeds Rules provides a 'after Feeds import' rules event.
So I tried creating a rule that triggers 'showtimes' importer (using my custom action above) after 'films' importer has run. But I ran into a problem applying a condition on the rule provided by the module. I'm not convinced this is the best method anyway.