File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
packages/playground/data-liberation/src/import Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -205,7 +205,10 @@ public function next_step() {
205205 $ this ->next_stage = self ::STAGE_TOPOLOGICAL_SORT ;
206206 return false ;
207207 case self ::STAGE_TOPOLOGICAL_SORT :
208- $ this ->next_topological_sort_step ();
208+ if ( true === $ this ->topological_sort_next_entity () ) {
209+ return true ;
210+ }
211+ $ this ->stage = self ::STAGE_FRONTLOAD_ASSETS ;
209212 return true ;
210213 case self ::STAGE_FRONTLOAD_ASSETS :
211214 if ( true === $ this ->frontload_next_entity () ) {
@@ -373,20 +376,17 @@ private function frontloading_advance_reentrancy_cursor() {
373376 }
374377 }
375378
376- private function next_topological_sort_step () {
379+ private function topological_sort_next_entity () {
377380 if ( null === $ this ->entity_iterator ) {
378- $ this ->downloader = new WP_Attachment_Downloader ( $ this ->options );
379381 $ this ->entity_iterator = $ this ->create_entity_iterator ();
380382 $ this ->topological_sorter = new WP_Topological_Sorter ();
381383 }
382384
383385 if ( ! $ this ->entity_iterator ->valid () ) {
384- $ this ->stage = self ::STAGE_FRONTLOAD_ASSETS ;
385386 $ this ->topological_sorter = null ;
386- $ this ->downloader = null ;
387387 $ this ->entity_iterator = null ;
388388 $ this ->resume_at_entity = null ;
389- return ;
389+ return false ;
390390 }
391391
392392 // $cursor = $this->entity_iterator->get_reentrancy_cursor();
You can’t perform that action at this time.
0 commit comments