1.21 Gigawatts. Remove non-future indexing loop.
Tried to have a seperate futures loop but it's too confusign having too write a Trait2, functon2, etc version of everything and keep it together. Futures are functional sort of, so the synchronous versioun can be removed. It still needs a ton of work though to be ready, or even get near the perf of of the sync+rayon version.
This commit is contained in:
@@ -219,20 +219,28 @@ mod tests {
|
||||
use hammond_data::Source;
|
||||
use hammond_data::dbqueries;
|
||||
|
||||
use hyper::Client;
|
||||
use hyper_tls::HttpsConnector;
|
||||
use tokio_core::reactor::Core;
|
||||
|
||||
#[test]
|
||||
// This test inserts an rss feed to your `XDG_DATA/hammond/hammond.db` so we make it explicit
|
||||
// to run it.
|
||||
#[ignore]
|
||||
fn test_cache_image() {
|
||||
let url = "http://www.newrustacean.com/feed.xml";
|
||||
let mut core = Core::new().unwrap();
|
||||
let client = Client::configure()
|
||||
.connector(HttpsConnector::new(4, &core.handle()).unwrap())
|
||||
.build(&core.handle());
|
||||
|
||||
let url = "http://www.newrustacean.com/feed.xml";
|
||||
// Create and index a source
|
||||
let mut source = Source::from_url(url).unwrap();
|
||||
let source = Source::from_url(url).unwrap();
|
||||
// Copy it's id
|
||||
let sid = source.id();
|
||||
|
||||
// Convert Source it into a Feed and index it
|
||||
let feed = source.into_feed(true).unwrap();
|
||||
// Convert Source it into a future Feed and index it
|
||||
let future = source.into_feed(&client, true);
|
||||
let feed = core.run(future).unwrap();
|
||||
feed.index().unwrap();
|
||||
|
||||
// Get the Podcast
|
||||
|
||||
@@ -13,3 +13,8 @@ extern crate tempdir;
|
||||
|
||||
pub mod downloader;
|
||||
pub mod errors;
|
||||
|
||||
#[cfg(test)]
|
||||
extern crate hyper_tls;
|
||||
#[cfg(test)]
|
||||
extern crate tokio_core;
|
||||
|
||||
Reference in New Issue
Block a user