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:
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user