Reset feed_parsing_error column when successful
This commit is contained in:
parent
fab7b8b04b
commit
9f699e46b5
10
model.php
10
model.php
@ -330,6 +330,7 @@ function update_feed($feed_id)
|
||||
|
||||
if ($result !== false) {
|
||||
|
||||
update_feed_parsing_error($feed_id, 0);
|
||||
update_feed_cache_infos($feed_id, $resource->getLastModified(), $resource->getEtag());
|
||||
update_items($feed_id, $result->items, $parser->grabber);
|
||||
write_debug();
|
||||
@ -338,8 +339,7 @@ function update_feed($feed_id)
|
||||
}
|
||||
}
|
||||
|
||||
\PicoTools\singleton('db')->table('feeds')->eq('id', $feed_id)->save(array('parsing_error' => 1));
|
||||
|
||||
update_feed_parsing_error($feed_id, 1);
|
||||
write_debug();
|
||||
|
||||
return false;
|
||||
@ -399,6 +399,12 @@ function get_empty_feeds()
|
||||
}
|
||||
|
||||
|
||||
function update_feed_parsing_error($feed_id, $value)
|
||||
{
|
||||
\PicoTools\singleton('db')->table('feeds')->eq('id', $feed_id)->save(array('parsing_error' => $value));
|
||||
}
|
||||
|
||||
|
||||
function update_feed_last_checked($feed_id)
|
||||
{
|
||||
\PicoTools\singleton('db')
|
||||
|
Loading…
Reference in New Issue
Block a user