@@ -124,7 +121,7 @@ class FeedsScheduler implements FeedsSchedulerInterface {
...
@@ -124,7 +121,7 @@ class FeedsScheduler implements FeedsSchedulerInterface {
// Refresh feeds that have a refresh time older than now minus
// Refresh feeds that have a refresh time older than now minus
// refresh period.
// refresh period.
$time=$this->time()-$period;
$time=FEEDS_REQUEST_TIME-$period;
$result=db_query_range('SELECT feed_nid, id AS importer_id, callback, last_scheduled_time FROM {feeds_schedule} WHERE id = "%s" AND callback = "%s" AND scheduled = 0 AND (last_scheduled_time < %d OR last_scheduled_time = 0) ORDER BY last_scheduled_time ASC',$importer->id,$callback,$time,0,$num);
$result=db_query_range('SELECT feed_nid, id AS importer_id, callback, last_scheduled_time FROM {feeds_schedule} WHERE id = "%s" AND callback = "%s" AND scheduled = 0 AND (last_scheduled_time < %d OR last_scheduled_time = 0) ORDER BY last_scheduled_time ASC',$importer->id,$callback,$time,0,$num);
while($feed_info=db_fetch_array($result)){
while($feed_info=db_fetch_array($result)){
...
@@ -230,37 +227,11 @@ class FeedsScheduler implements FeedsSchedulerInterface {
...
@@ -230,37 +227,11 @@ class FeedsScheduler implements FeedsSchedulerInterface {
}
}
}
}
/**
* Set the internal time of FeedsScheduler.
* Use for debugging.
*
* @param $time
* UNIX time that the scheduler should use for comparing the schedule. Set
* this time to test the behavior of the scheduler in the future or past.
* If set to 0, FeedsScheduler will use the current time.
*/
publicfunctiondebugSetTime($time){
$this->debugTime=$time;
}
/**
* Returns the internal time that the scheduler is operating on.
*
* Usually returns FEEDS_REQUEST_TIME, unless a debug time has been set