Store last ping of devices

This commit is contained in:
2024-09-09 21:05:52 +02:00
parent 6bdebe6932
commit 7cac6aeb35
4 changed files with 80 additions and 0 deletions

View File

@ -6,6 +6,9 @@ pub const SESSION_COOKIE_NAME: &str = "X-session-cookie";
/// Energy refresh operations interval
pub const ENERGY_REFRESH_INTERVAL: Duration = Duration::from_secs(30);
/// Maximum time after a ping during which a device is considered "up"
pub const DEVICE_MAX_PING_TIME: u64 = 30;
/// Fallback value to use if production cannot be fetched
pub const FALLBACK_PRODUCTION_VALUE: i32 = 5000;