cave: move posts_cache from hunter
This commit is contained in:
parent
a6a6afbf33
commit
fe0d19fbc6
|
@ -369,6 +369,7 @@ dependencies = [
|
|||
"eventsource-stream",
|
||||
"futures",
|
||||
"inotify",
|
||||
"metrics",
|
||||
"redis",
|
||||
"reqwest",
|
||||
"serde",
|
||||
|
|
|
@ -21,3 +21,4 @@ tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
|||
inotify = "0.10"
|
||||
tokio-postgres = "0.7"
|
||||
url = "2"
|
||||
metrics = "0.20"
|
||||
|
|
|
@ -8,6 +8,7 @@ pub mod firehose;
|
|||
pub mod live_file;
|
||||
pub mod word_list;
|
||||
pub mod db;
|
||||
pub mod posts_cache;
|
||||
|
||||
pub const PERIODS: &[u64] = &[4, 24, 7 * 24];
|
||||
|
||||
|
|
|
@ -9,7 +9,6 @@ mod config;
|
|||
mod block_list;
|
||||
mod scheduler;
|
||||
mod worker;
|
||||
mod posts_cache;
|
||||
mod webfinger;
|
||||
|
||||
use scheduler::InstanceHost;
|
||||
|
@ -42,7 +41,7 @@ async fn run() {
|
|||
|
||||
let db = cave::db::Database::connect(&config.database).await;
|
||||
let mut store = cave::store::Store::new(16, config.redis, config.redis_password_file).await;
|
||||
let posts_cache = posts_cache::PostsCache::new(65536);
|
||||
let posts_cache = cave::posts_cache::PostsCache::new(65536);
|
||||
|
||||
let block_list = block_list::BlockList::new(&config.blocklist).await;
|
||||
|
||||
|
|
|
@ -5,11 +5,11 @@ use std::time::{Duration, Instant};
|
|||
use cave::{
|
||||
db::Database,
|
||||
feed::{Feed, EncodablePost, Post, StreamError},
|
||||
posts_cache::PostsCache,
|
||||
store::Store,
|
||||
};
|
||||
use futures::{StreamExt, future};
|
||||
use reqwest::StatusCode;
|
||||
use crate::posts_cache::PostsCache;
|
||||
use crate::scheduler::{Host, InstanceHost};
|
||||
use crate::webfinger;
|
||||
|
||||
|
|
Loading…
Reference in New Issue