Advertisement
Guest User

Untitled

a guest
Dec 12th, 2012
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.77 KB | None | 0 0
  1. *** old_backfill.php 2012-12-12 05:34:45.910171452 -0500
  2. --- backfill.php 2012-12-11 17:13:44.038893463 -0500
  3. ***************
  4. *** 223,232 ****
  5.  
  6. while($this->daysOld($dateofnextone) < $days) //match on days not timestamp to speed things up
  7. {
  8. while(($tmpDate = $this->postdate($nntp,($upperbound-$interval),$pddebug))>$goaldate)
  9. {
  10. ! $upperbound = $upperbound - $interval;
  11. if($debug) echo "New upperbound ($upperbound) is ".$this->daysOld($tmpDate)." days old. $n";
  12. }
  13. if(!$templowered)
  14. {
  15. --- 223,234 ----
  16.  
  17. while($this->daysOld($dateofnextone) < $days) //match on days not timestamp to speed things up
  18. {
  19. + $nskip = 1;
  20. while(($tmpDate = $this->postdate($nntp,($upperbound-$interval),$pddebug))>$goaldate)
  21. {
  22. ! $upperbound = $upperbound - $interval - ($nskip - 1);
  23. if($debug) echo "New upperbound ($upperbound) is ".$this->daysOld($tmpDate)." days old. $n";
  24. + $nskip = $nskip * 2;
  25. }
  26. if(!$templowered)
  27. {
  28. ***************
  29. *** 236,243 ****
  30. $dateofnextone = $this->postdate($nntp,($upperbound-1),$pddebug);
  31.  
  32. //TODO:fix here to stop getting stuck with no valid next date
  33. while(!$dateofnextone)
  34. ! { $dateofnextone = $this->postdate($nntp,($upperbound-1),$pddebug); }
  35. }
  36. echo "Determined to be article $upperbound which is ".$this->daysOld($dateofnextone)." days old (".date("r", $dateofnextone).") $n";
  37. return $upperbound;
  38. --- 238,251 ----
  39. $dateofnextone = $this->postdate($nntp,($upperbound-1),$pddebug);
  40.  
  41. //TODO:fix here to stop getting stuck with no valid next date
  42. + $skip = 1;
  43. while(!$dateofnextone)
  44. ! {
  45. ! $upperbound = $upperbound - $skip;
  46. ! $skip = $skip * 2;
  47. ! if($debug) echo "Getting next article date... $upperbound\n";
  48. ! $dateofnextone = $this->postdate($nntp,($upperbound-1),$pddebug);
  49. ! }
  50. }
  51. echo "Determined to be article $upperbound which is ".$this->daysOld($dateofnextone)." days old (".date("r", $dateofnextone).") $n";
  52. return $upperbound;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement