fixes history loading slowly due to context switches

This commit is contained in:
2025-01-04 19:13:32 -05:00
parent c69022448f
commit 4dd7cea97d
12 changed files with 278 additions and 122 deletions

View File

@@ -15,6 +15,8 @@ pub enum HttpServerResultError {
TlmUuidNotFound { uuid: String },
#[error("DateTime Parsing Error: {date_time}")]
InvalidDateTime { date_time: String },
#[error("Timed out")]
Timeout,
}
impl ResponseError for HttpServerResultError {
@@ -23,6 +25,7 @@ impl ResponseError for HttpServerResultError {
HttpServerResultError::TlmNameNotFound { .. } => StatusCode::NOT_FOUND,
HttpServerResultError::TlmUuidNotFound { .. } => StatusCode::NOT_FOUND,
HttpServerResultError::InvalidDateTime { .. } => StatusCode::BAD_REQUEST,
HttpServerResultError::Timeout { .. } => StatusCode::GATEWAY_TIMEOUT,
}
}
fn error_response(&self) -> HttpResponse {