Source: Remove ignore_etags option

This is never used anywhere else apart from the testsuite. Instead
of ignoring etags we should instead not save them if the feed does
not return 200 or 304. See #64.
This commit is contained in:
Jordan Petridis
2018-08-14 13:40:33 +03:00
parent c53ad56a6d
commit 471f6ff93b
6 changed files with 20 additions and 27 deletions
+2 -2
View File
@@ -133,7 +133,7 @@ mod tests {
let source = Source::from_url(url).unwrap();
// Copy its id
let sid = source.id();
pipeline::run(vec![source], true).unwrap();
pipeline::run(vec![source]).unwrap();
// Get the podcast
let pd = dbqueries::get_podcast_from_source_id(sid).unwrap();
@@ -164,7 +164,7 @@ mod tests {
let source = Source::from_url(url).unwrap();
// Copy its id
let sid = source.id();
pipeline::run(vec![source], true).unwrap();
pipeline::run(vec![source]).unwrap();
// Get the podcast
let pd = dbqueries::get_podcast_from_source_id(sid).unwrap();
+2 -2
View File
@@ -205,7 +205,7 @@ where
rayon::spawn(move || {
if let Some(s) = source {
// Refresh only specified feeds
pipeline::run(s, false)
pipeline::run(s)
.map_err(|err| error!("Error: {}", err))
.map_err(|_| error!("Error while trying to update the database."))
.ok();
@@ -213,7 +213,7 @@ where
// Refresh all the feeds
dbqueries::get_sources()
.map(|s| s.into_iter())
.and_then(|s| pipeline::run(s, false))
.and_then(pipeline::run)
.map_err(|err| error!("Error: {}", err))
.ok();
};