allow listing and viewing uncommitted recordings

There may be considerable lag between being fully written and being committed
when using the flush_if_sec feature. Additionally, this is a step toward
listing and viewing recordings before they're fully written. That's a
considerable delay: 60 to 120 seconds for the first recording of a run,
0 to 60 seconds for subsequent recordings.

These recordings aren't yet included in the information returned by
/api/?days=true. They probably should be, but small steps.
This commit is contained in:
Scott Lamb
2018-03-02 11:38:11 -08:00
parent b17761e871
commit 45f7b30619
8 changed files with 171 additions and 34 deletions

View File

@@ -49,7 +49,8 @@ const LIST_RECORDINGS_BY_TIME_SQL: &'static str = r#"
recording.sample_file_bytes,
recording.video_samples,
recording.video_sync_samples,
recording.video_sample_entry_id
recording.video_sample_entry_id,
recording.open_id
from
recording
where
@@ -71,7 +72,8 @@ const LIST_RECORDINGS_BY_ID_SQL: &'static str = r#"
recording.sample_file_bytes,
recording.video_samples,
recording.video_sync_samples,
recording.video_sample_entry_id
recording.video_sample_entry_id,
recording.open_id
from
recording
where
@@ -173,6 +175,7 @@ fn list_recordings_inner(mut rows: rusqlite::Rows,
video_samples: row.get_checked(6)?,
video_sync_samples: row.get_checked(7)?,
video_sample_entry_id: row.get_checked(8)?,
open_id: row.get_checked(9)?,
})?;
}
Ok(())