r80373 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r80372‎ | r80373 | r80374 >
Date:02:03, 15 January 2011
Author:ariel
Status:deferred
Tags:
Comment:
fix chunk number stuff in the new class, woops.
Modified paths:
  • /branches/ariel/xmldumps-backup/worker.py (modified) (history)

Diff [purge]

Index: branches/ariel/xmldumps-backup/worker.py
@@ -65,7 +65,7 @@
6666
6767 if (self._revsPerChunkHistory):
6868 if (len(self._revsPerChunkHistory) == 1):
69 - self._numChunksHistory = self.getNumberOfChunksForXMLDumps(totalEdits, self._pagesPerChunkHistory)
 69+ self._numChunksHistory = self.getNumberOfChunksForXMLDumps(self.Stats.totalEdits, self._pagesPerChunkHistory[0])
7070 self._revsPerChunkHistory = [ self._revsPerChunkHistory[0] for i in range(self._numChunksHistory)]
7171 else:
7272 self._numChunksHistory = len(self._revsPerChunkHistory)
@@ -74,7 +74,7 @@
7575 # self._pagesPerChunkHistory = ....
7676 elif (self._pagesPerChunkHistory):
7777 if (len(self._pagesPerChunkHistory) == 1):
78 - self._numChunksHistory = self.getNumberOfChunksForXMLDumps(totalPages, self._pagesPerChunkHistory)
 78+ self._numChunksHistory = self.getNumberOfChunksForXMLDumps(self.Stats.totalPages, self._pagesPerChunkHistory[0])
7979 self._pagesPerChunkHistory = [ self._pagesPerChunkHistory[0] for i in range(self._numChunksHistory)]
8080 else:
8181 self._numChunksHistory = len(self._pagesPerChunkHistory)
@@ -83,7 +83,7 @@
8484
8585 if (self._pagesPerChunkAbstract):
8686 if (len(self._pagesPerChunkAbstract) == 1):
87 - self._numChunksAbstract = self.getNumberOfChunksForXMLDumps(totalPages, self._pagesPerChunkAbstract)
 87+ self._numChunksAbstract = self.getNumberOfChunksForXMLDumps(self.Stats.totalPages, self._pagesPerChunkAbstract[0])
8888 self._pagesPerChunkAbstract = [ self._pagesPerChunkAbstract[0] for i in range(self._numChunksAbstract)]
8989 else:
9090 self._numChunksAbstract = len(self._pagesPerChunkAbstract)
@@ -135,7 +135,7 @@
136136 self.totalEdits = None
137137 self.config = wiki.config
138138 self.dbName = dbName
139 - (totalPages, totalEdits) = self.getStatistics(config,dbName)
 139+ (self.totalPages, totalEdits) = self.getStatistics(config,dbName)
140140
141141 def getStatistics(self, config,dbName):
142142 """Get (cached) statistics for the wiki"""

Status & tagging log