File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -33,12 +33,16 @@ public function execute(): void {
3333
3434 $ this ->output ( "Generating persistent ids for batch of $ batchSize pages \n" );
3535
36- $ this ->savePersistentIds ( $ pageIds , $ this ->generateBulkPersistentIds ( $ batchSize ) );
36+ $ idMap = array_combine ( $ pageIds , $ this ->generateBulkPersistentIds ( $ batchSize ) );
37+
38+ $ this ->output ( 'Generated batch of persistent IDs: ' . json_encode ( $ idMap ) . "\n" );
39+
40+ $ this ->savePersistentIds ( $ idMap );
3741
3842 $ generatedIdsCount += $ batchSize ;
3943 }
4044
41- $ this ->output ( "Generated $ generatedIdsCount persistent IDs \n" );
45+ $ this ->output ( "Done. Generated $ generatedIdsCount persistent IDs \n" );
4246 }
4347
4448 /**
@@ -60,10 +64,8 @@ private function generateBulkPersistentIds( int $count ): array {
6064 );
6165 }
6266
63- private function savePersistentIds ( array $ pageIds , array $ persistentIds ): void {
64- PersistentPageIdentifiersExtension::getInstance ()->getPersistentPageIdentifiersRepo ()->savePersistentIds (
65- array_combine ( $ pageIds , $ persistentIds )
66- );
67+ private function savePersistentIds ( array $ idMap ): void {
68+ PersistentPageIdentifiersExtension::getInstance ()->getPersistentPageIdentifiersRepo ()->savePersistentIds ( $ idMap );
6769 }
6870
6971}
You can’t perform that action at this time.
0 commit comments