finish stat collection and slack alerts, daily update. async mutex

This commit is contained in:
mbecker20
2023-01-04 08:01:25 +00:00
parent 17a5d624d9
commit c90e91d78b
17 changed files with 566 additions and 144 deletions

View File

@@ -65,6 +65,8 @@ pub fn gen_core_config(sub_matches: &ArgMatches) {
host,
port,
jwt_valid_for,
monitoring_interval: Timelength::OneMinute,
daily_offset_hours: 0,
slack_url,
local_auth: true,
github_oauth: Default::default(),

View File

@@ -13,11 +13,18 @@ pub struct CoreConfig {
#[serde(default = "default_core_port")]
pub port: u16,
// daily utc offset in hours to run daily update. eg 8:00 eastern time is 13:00 UTC, so offset should be 13. default of 0 runs at UTC midnight.
#[serde(default)]
pub daily_offset_hours: u8,
// jwt config
pub jwt_secret: String,
#[serde(default = "default_jwt_valid_for")]
pub jwt_valid_for: Timelength,
// interval at which to collect server stats and alert for out of bounds
pub monitoring_interval: Timelength,
// used to verify validity from github webhooks
pub github_webhook_secret: String,