--- a/Command/SyncDocumentsCommand.php Fri Nov 04 11:56:59 2011 +0100
+++ b/Command/SyncDocumentsCommand.php Fri Nov 04 15:53:59 2011 +0100
@@ -50,7 +50,11 @@
//TODO : check class to implement DocumentInterface
//TODO : write progress
$doclist = $rep->findAll();
+ $total = count($doclist);
+ $done = 0;
foreach ($doclist as $doc) {
+ $done++;
+ $output->writeln("Process doc id ".$doc->getId()." $done/$total ".strval(intval(floatval($done)/floatval($total)*100.0))."%");
$docrep->writeDocument($doc, $this->getContainer()->getParameter('wiki_tag.document_id_column'), $this->getContainer()->getParameter('wiki_tag.fields'));
}
$doctrine->getEntityManager()->flush();