From 24f6c2afad1937cf92c4a4def6a5bfd4fe866ab1 Mon Sep 17 00:00:00 2001 From: Astro Date: Wed, 16 Nov 2022 19:12:25 +0100 Subject: [PATCH] gatherer: move mod firehose to cave --- {gatherer => cave}/src/firehose.rs | 0 cave/src/lib.rs | 1 + gatherer/src/http_server.rs | 6 ++++-- gatherer/src/main.rs | 3 +-- 4 files changed, 6 insertions(+), 4 deletions(-) rename {gatherer => cave}/src/firehose.rs (100%) diff --git a/gatherer/src/firehose.rs b/cave/src/firehose.rs similarity index 100% rename from gatherer/src/firehose.rs rename to cave/src/firehose.rs diff --git a/cave/src/lib.rs b/cave/src/lib.rs index 0752956..04ad380 100644 --- a/cave/src/lib.rs +++ b/cave/src/lib.rs @@ -4,6 +4,7 @@ pub mod config; pub mod feed; pub mod store; pub mod trend_tag; +pub mod firehose; pub const PERIODS: &[u64] = &[4, 24, 7 * 24]; diff --git a/gatherer/src/http_server.rs b/gatherer/src/http_server.rs index e7ca318..7e95590 100644 --- a/gatherer/src/http_server.rs +++ b/gatherer/src/http_server.rs @@ -11,10 +11,12 @@ use axum::{ }; use axum_extra::routing::SpaRouter; use futures::{stream, StreamExt}; -use cave::systemd; +use cave::{ + firehose::FirehoseFactory, + systemd, +}; use crate::{ html_template::HtmlTemplate, - firehose::FirehoseFactory, RequestFactory, request_mux::RequestMux, trends::TrendsResults, diff --git a/gatherer/src/main.rs b/gatherer/src/main.rs index e981c34..5454d54 100644 --- a/gatherer/src/main.rs +++ b/gatherer/src/main.rs @@ -1,9 +1,9 @@ use cave::{ config::LoadConfig, + firehose::FirehoseFactory, store::{Store, TREND_POOL_SIZE}, PERIODS, }; use crate::{ - firehose::FirehoseFactory, request_mux::{Muxable, RequestMux}, }; @@ -12,7 +12,6 @@ mod trends; mod html_template; mod http_server; mod request_mux; -mod firehose; type Languages = Vec;