This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extern crate futures; | |
extern crate hyper; | |
extern crate hyper_tls; | |
extern crate tokio_core; | |
extern crate num_cpus; | |
use db; | |
use diesel::prelude::*; | |
use super::schema::directory::dsl::*; | |
use self::futures::{Future, Stream}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// get size of the history | |
int historySize = Flow.get(context).getHistory().size(); | |
// pop all old history off the stack | |
History.Builder builder = history.buildUpon(); | |
while (historySize > 1) { | |
builder.pop(); | |
Flow.get(context).setHistory(builder.build(), Flow.Direction.REPLACE); | |
historySize--; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// fetch_all_feed_data | |
/// async fetch to get all feeds from urls | |
pub fn fetch_all_feed_data(&mut self) -> Result<Vec<Channel>, Error> { | |
let requests: Vec<_> = self.get_all_feed_urls() | |
.into_iter() | |
.take(50) | |
.filter_map(|url| match url.parse::<hyper::Uri>() { | |
Ok(uri) => { | |
println!("{:?}", url); | |
Some(uri) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
PROGNAME=$(basename $0) | |
WORKING_DIR=$(cd -P -- "$(dirname -- "$0")" && pwd -P) | |
OLD_TITLE="DTStart" | |
OLD_PACKAGE="old.package.name" | |
die() { | |
echo "$PROGNAME: $*" >&2 |