update dependencies
This commit is contained in:
parent
6a4c1f3488
commit
ac7ba66bb3
File diff suppressed because it is too large
Load Diff
|
@ -24,11 +24,11 @@ let
|
||||||
in {
|
in {
|
||||||
ticker-update = build {
|
ticker-update = build {
|
||||||
pname = "ticker-update";
|
pname = "ticker-update";
|
||||||
cargoSha256 = "0g4n8524n2kbn6ln3w98ig3wxss3c5fkbzp1zhwmm95pzcy7n6bm";
|
cargoSha256 = "0ly7z50am7xgqcgghkzxqgi8fx1jmsl5zh32rymnwq1yad5z19nq";
|
||||||
};
|
};
|
||||||
ticker-serve = (build {
|
ticker-serve = (build {
|
||||||
pname = "ticker-serve";
|
pname = "ticker-serve";
|
||||||
cargoSha256 = "0dxmgrgfjbrhghs148381knns5hy8a2dmc91m81l5zf663x2pwf4";
|
cargoSha256 = "1wqyg7mil35a8d0779yq3w14x7p5ahmfxnmlxx9a0mnfy8jxizb4";
|
||||||
}).overrideAttrs (oa: {
|
}).overrideAttrs (oa: {
|
||||||
postBuild = ''
|
postBuild = ''
|
||||||
${oa.postBuild}
|
${oa.postBuild}
|
||||||
|
|
|
@ -6,8 +6,8 @@ edition = "2018"
|
||||||
license = "AGPL-3.0-or-later"
|
license = "AGPL-3.0-or-later"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
gotham = "0.5"
|
gotham = "~0.7"
|
||||||
gotham_derive = "0.5"
|
gotham_derive = "~0.7"
|
||||||
http = "0.2"
|
http = "0.2"
|
||||||
mime = "0.3"
|
mime = "0.3"
|
||||||
typed-html = "0.2"
|
typed-html = "0.2"
|
||||||
|
|
|
@ -5,11 +5,10 @@ extern crate gotham_derive;
|
||||||
|
|
||||||
use std::sync::{Arc, Mutex};
|
use std::sync::{Arc, Mutex};
|
||||||
use gotham::{
|
use gotham::{
|
||||||
handler::assets::FileOptions,
|
handler::FileOptions,
|
||||||
router::builder::{DefineSingleRoute, DrawRoutes},
|
router::builder::{DefineSingleRoute, DrawRoutes},
|
||||||
middleware::state::StateMiddleware,
|
middleware::state::StateMiddleware,
|
||||||
pipeline::single::single_pipeline,
|
pipeline::{single_pipeline, single_middleware},
|
||||||
pipeline::single_middleware,
|
|
||||||
router::builder::*,
|
router::builder::*,
|
||||||
};
|
};
|
||||||
use diesel::{Connection, pg::PgConnection};
|
use diesel::{Connection, pg::PgConnection};
|
||||||
|
@ -48,4 +47,5 @@ fn main() {
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
gotham::start("0.0.0.0:8400", router)
|
gotham::start("0.0.0.0:8400", router)
|
||||||
|
.unwrap()
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,10 +6,10 @@ edition = "2018"
|
||||||
license = "AGPL-3.0-or-later"
|
license = "AGPL-3.0-or-later"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
reqwest = "~0.9"
|
reqwest = { version = "~0.11", features = ["blocking"] }
|
||||||
diesel = { version = "~1", features = ["postgres", "chrono"] }
|
diesel = { version = "~1", features = ["postgres", "chrono"] }
|
||||||
chrono = "~0.4"
|
chrono = "~0.4"
|
||||||
num_cpus = "~1"
|
num_cpus = "~1"
|
||||||
crossbeam = "~0.7"
|
crossbeam = "~0.8"
|
||||||
rrule = "0.5"
|
rrule = "0.7"
|
||||||
libticker = { path = "../libticker" }
|
libticker = { path = "../libticker" }
|
||||||
|
|
|
@ -83,13 +83,13 @@ fn obj_to_events(calendar: String, obj: &Object) -> Vec<Event> {
|
||||||
|
|
||||||
pub struct Resources {
|
pub struct Resources {
|
||||||
db_url: String,
|
db_url: String,
|
||||||
http_client: reqwest::Client,
|
http_client: reqwest::blocking::Client,
|
||||||
queue: RwLock<VecDeque<(String, CalendarOptions)>>,
|
queue: RwLock<VecDeque<(String, CalendarOptions)>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Resources {
|
impl Resources {
|
||||||
pub fn new(db_url: String, queue: VecDeque<(String, CalendarOptions)>) -> Self {
|
pub fn new(db_url: String, queue: VecDeque<(String, CalendarOptions)>) -> Self {
|
||||||
let http_client = reqwest::Client::new();
|
let http_client = reqwest::blocking::Client::new();
|
||||||
let queue = RwLock::new(queue);
|
let queue = RwLock::new(queue);
|
||||||
Resources { db_url, http_client, queue }
|
Resources { db_url, http_client, queue }
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue