Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- *** old_backfill.php 2012-12-12 05:34:45.910171452 -0500
- --- backfill.php 2012-12-11 17:13:44.038893463 -0500
- ***************
- *** 223,232 ****
- while($this->daysOld($dateofnextone) < $days) //match on days not timestamp to speed things up
- {
- while(($tmpDate = $this->postdate($nntp,($upperbound-$interval),$pddebug))>$goaldate)
- {
- ! $upperbound = $upperbound - $interval;
- if($debug) echo "New upperbound ($upperbound) is ".$this->daysOld($tmpDate)." days old. $n";
- }
- if(!$templowered)
- {
- --- 223,234 ----
- while($this->daysOld($dateofnextone) < $days) //match on days not timestamp to speed things up
- {
- + $nskip = 1;
- while(($tmpDate = $this->postdate($nntp,($upperbound-$interval),$pddebug))>$goaldate)
- {
- ! $upperbound = $upperbound - $interval - ($nskip - 1);
- if($debug) echo "New upperbound ($upperbound) is ".$this->daysOld($tmpDate)." days old. $n";
- + $nskip = $nskip * 2;
- }
- if(!$templowered)
- {
- ***************
- *** 236,243 ****
- $dateofnextone = $this->postdate($nntp,($upperbound-1),$pddebug);
- //TODO:fix here to stop getting stuck with no valid next date
- while(!$dateofnextone)
- ! { $dateofnextone = $this->postdate($nntp,($upperbound-1),$pddebug); }
- }
- echo "Determined to be article $upperbound which is ".$this->daysOld($dateofnextone)." days old (".date("r", $dateofnextone).") $n";
- return $upperbound;
- --- 238,251 ----
- $dateofnextone = $this->postdate($nntp,($upperbound-1),$pddebug);
- //TODO:fix here to stop getting stuck with no valid next date
- + $skip = 1;
- while(!$dateofnextone)
- ! {
- ! $upperbound = $upperbound - $skip;
- ! $skip = $skip * 2;
- ! if($debug) echo "Getting next article date... $upperbound\n";
- ! $dateofnextone = $this->postdate($nntp,($upperbound-1),$pddebug);
- ! }
- }
- echo "Determined to be article $upperbound which is ".$this->daysOld($dateofnextone)." days old (".date("r", $dateofnextone).") $n";
- return $upperbound;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement