fix timestamp stuff, more fallout from bad merge attempt
authorAriel Glenn <ariel@users.mediawiki.org>
Tue, 23 Aug 2011 00:36:15 +0000 (00:36 +0000)
committerAriel Glenn <ariel@users.mediawiki.org>
Tue, 23 Aug 2011 00:36:15 +0000 (00:36 +0000)
maintenance/dumpTextPass.php

index 0ece971..822ea18 100644 (file)
@@ -181,6 +181,7 @@ class TextPassDumper extends BackupDumper {
 
                if ( $this->reporting ) {
                        $now = wfTimestamp( TS_DB );
+                       $nowts = wfTime();
                        $deltaAll = wfTime() - $this->startTime;
                        $deltaPart = wfTime() - $this->lastTime;
                        $this->pageCountPart = $this->pageCount - $this->pageCountLast;
@@ -221,7 +222,7 @@ class TextPassDumper extends BackupDumper {
                        }
                        $this->progress( sprintf( "%s: %s (ID %d) %d pages (%0.1f|%0.1f/sec all|curr), %d revs (%0.1f|%0.1f/sec all|curr), %0.1f%%|%0.1f%% prefetched (all|curr), ETA %s [max %d]",-
                                        $now, wfWikiID(), $this->ID, $this->pageCount, $pageRate, $pageRatePart, $this->revCount, $revRate, $revRatePart, $fetchRate, $fetchRatePart, $etats, $this->maxCount ) );
-                       $this->lastTime = $now;
+                       $this->lastTime = $nowts;
                        $this->revCountLast = $this->revCount;
                        $this->prefetchCountLast = $this->prefetchCount;
                        $this->fetchCountLast = $this->fetchCount;
@@ -233,6 +234,10 @@ class TextPassDumper extends BackupDumper {
        }
 
        function checkIfTimeExceeded() {
+               $m1 = $this->maxTimeAllowed;
+               $m2 = $this->lastTime; 
+               $m3 =  $this->timeOfCheckpoint;
+               $m4 = $this->lastTime - $this->timeOfCheckpoint;
                if ( $this->maxTimeAllowed &&  ( $this->lastTime - $this->timeOfCheckpoint  > $this->maxTimeAllowed ) ) {
                        return True;
                }