reduce vu update frequency, report more sql errors, fix bug with startup show time

This commit is contained in:
2026-06-10 00:23:13 +02:00
parent b1453b3fbc
commit 5aa2631b99
3 changed files with 11 additions and 3 deletions
+6 -1
View File
@@ -9,6 +9,7 @@ pub mod conversation;
pub struct StageDirection {
pub episode_number: u32,
#[serde(skip)]
#[serde(default="StageDirection::default_end_time")]
pub end_time: DateTime<Utc>,
pub narrative: String,
}
@@ -17,13 +18,17 @@ impl StageDirection {
pub fn time_remaining(&self) -> Duration {
self.end_time.signed_duration_since(Utc::now())
}
fn default_end_time() -> DateTime<Utc> {
Utc::now() + Duration::hours(2)
}
}
impl Default for StageDirection {
fn default() -> Self {
Self {
episode_number: 0,
end_time: Utc::now() + Duration::hours(2),
end_time: Self::default_end_time(),
narrative: Default::default(),
}
}