server/src/app/Console/Commands/ManageHandles.php
changeset 326 226d5b17a119
parent 154 ded3cf22eef8
child 406 cf0f23803a53
--- a/server/src/app/Console/Commands/ManageHandles.php	Sun Oct 09 11:44:18 2016 +0200
+++ b/server/src/app/Console/Commands/ManageHandles.php	Tue Oct 11 02:49:59 2016 +0200
@@ -109,7 +109,7 @@
 
         $total = $this->documentRepository->getCount();
 
-        $docs = $this->documentRepository->paginateAll($stepSize, 'page');
+        $docs = $this->documentRepository->paginate(null, $stepSize, config('corpusparole.pagination_page_param'), 1, '_graph');
 
         $progressBar = $this->output->createProgressBar($docs->total());
         $progressBar->setFormat(' %current%/%max% [%bar%] %percent:3s%% - %message%');
@@ -120,7 +120,7 @@
                 $progressBar->setMessage($doc->getId());
                 $progressBar->advance();
             }
-            $docs = ($docs->hasMorePages()? $this->documentRepository->paginateAll($stepSize, 'page', $docs->currentPage()+1):null);
+            $docs = ($docs->hasMorePages()? $this->documentRepository->paginate(null, $stepSize, config('corpusparole.pagination_page_param'), $docs->currentPage()+1, '_graph'):null);
         }
 
         $progressBar->finish();
@@ -128,7 +128,7 @@
 
         $this->info("Removing extra handles...\n");
 
-        $handles = $this->handleClient->paginateAll($this->handlePrefix, $stepSize, 'page');
+        $handles = $this->handleClient->paginateAll($this->handlePrefix, $stepSize, config('corpusparole.pagination_page_param'));
 
         $progressBar = $this->output->createProgressBar($handles->total());
         $progressBar->setFormat(' %current%/%max% [%bar%] %percent:3s%% - %message%');
@@ -141,7 +141,7 @@
                 $progressBar->setMessage($handle);
                 $progressBar->advance();
             }
-            $handles = $handles->hasMorePages()?$this->handleClient->paginateAll($this->handlePrefix, $stepSize, 'page', $handles->currentPage()+1):null;
+            $handles = $handles->hasMorePages()?$this->handleClient->paginateAll($this->handlePrefix, $stepSize, config('corpusparole.pagination_page_param'), $handles->currentPage()+1):null;
         }
 
         $this->info("\nRemoving extra handles completed");