move GIS check to Python agent (#29)

This commit is contained in:
Josh Thomas 2024-12-12 23:32:52 -06:00 committed by GitHub
parent b993e35460
commit cff90ee869
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 80 additions and 102 deletions

View file

@ -29,6 +29,22 @@ impl IpcCommand for v1::check::HealthRequest {
}
}
impl IpcCommand for v1::check::GeoDjangoPrereqsRequest {
fn into_request(&self) -> messages::Request {
messages::Request {
command: Some(messages::request::Command::CheckGeodjangoPrereqs(*self)),
}
}
fn from_response(response: messages::Response) -> Result<messages::Response, ProcessError> {
match response.result {
Some(messages::response::Result::CheckGeodjangoPrereqs(_)) => Ok(response),
Some(messages::response::Result::Error(e)) => Err(ProcessError::Health(e.message)),
_ => Err(ProcessError::Response),
}
}
}
impl IpcCommand for v1::python::GetEnvironmentRequest {
fn into_request(&self) -> messages::Request {
messages::Request {