2022-11-05 20:51:18 +01:00
|
|
|
pub mod init;
|
|
|
|
pub mod systemd;
|
|
|
|
pub mod config;
|
2022-11-07 22:07:07 +01:00
|
|
|
pub mod feed;
|
|
|
|
pub mod store;
|
2022-11-08 00:43:46 +01:00
|
|
|
pub mod trend_tag;
|
2022-11-16 19:12:25 +01:00
|
|
|
pub mod firehose;
|
2023-01-23 21:04:01 +01:00
|
|
|
pub mod live_file;
|
2023-02-24 19:39:30 +01:00
|
|
|
pub mod word_list;
|
2023-08-08 18:42:34 +02:00
|
|
|
pub mod db;
|
2023-10-12 23:28:48 +02:00
|
|
|
pub mod posts_cache;
|
2023-10-15 20:30:15 +02:00
|
|
|
pub mod activitypub;
|
2023-10-18 02:03:41 +02:00
|
|
|
pub mod block_list;
|
|
|
|
|
2022-11-09 18:11:02 +01:00
|
|
|
|
|
|
|
pub const PERIODS: &[u64] = &[4, 24, 7 * 24];
|
2022-11-14 03:14:12 +01:00
|
|
|
|
|
|
|
/// compare the selected period against how many multiples of preceding periods
|
|
|
|
pub const PERIOD_COMPARE_WINDOW: u64 = 3;
|
|
|
|
|
2024-03-27 02:49:15 +01:00
|
|
|
#[must_use] pub fn current_hour() -> u64 {
|
2024-03-27 02:11:35 +01:00
|
|
|
chrono::offset::Utc::now().timestamp() as u64 / 3600
|
2022-11-14 03:14:12 +01:00
|
|
|
}
|