reduce vu update frequency, report more sql errors, fix bug with startup show time
This commit is contained in:
+6
-1
@@ -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(),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user