1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-25 04:01:28 +00:00

per-feed update intervals

This commit is contained in:
Andrew Dolgov
2005-10-13 04:15:09 +01:00
parent 1cae701741
commit d148926e2b
7 changed files with 48 additions and 10 deletions

View File

@@ -24,12 +24,20 @@
db_query($link, "BEGIN");
$result = db_query($link, "SELECT feed_url,id,last_updated FROM ttrss_feeds");
$result = db_query($link, "SELECT feed_url,id,
substring(last_updated,1,19) as last_updated,
update_interval FROM ttrss_feeds");
while ($line = db_fetch_assoc($result)) {
// if (!$line["last_updated"] || time() - strtotime($line["last_updated"]) > 1800) {
$upd_intl = $line["update_interval"];
if (!$upd_intl) $upd_intl = MIN_UPDATE_INTERVAL;
if (!$line["last_updated"] ||
time() - strtotime($line["last_updated"]) > ($upd_intl * 60)) {
update_rss_feed($link, $line["feed_url"], $line["id"]);
// }
}
}
purge_old_posts($link);