diff --git a/client-gui2 b/client-gui2 index 5c3181a6..412a577e 160000 --- a/client-gui2 +++ b/client-gui2 @@ -1 +1 @@ -Subproject commit 5c3181a65d943639caab3182e723206da316eaef +Subproject commit 412a577e47d64c1b220aef061da983268ee48dc6 diff --git a/common/proto/backup.proto b/common/proto/backup.proto index 65a189ed..9673ba2d 100644 --- a/common/proto/backup.proto +++ b/common/proto/backup.proto @@ -12,7 +12,6 @@ service BackupService { rpc ListDatabases(komp_ac.common.Empty) returns (ListDatabasesResponse); rpc CreateDatabase(CreateDatabaseRequest) returns (DatabaseInfo); rpc RunDatabaseMigrations(DatabaseRequest) returns (DatabaseInfo); - rpc ActivateDatabase(DatabaseRequest) returns (ActivateDatabaseResponse); } message DatabaseRequest { @@ -40,12 +39,6 @@ message ListDatabasesResponse { repeated DatabaseInfo databases = 2; } -message ActivateDatabaseResponse { - string database_name = 1; - bool switching = 2; - string message = 3; -} - enum BackupType { BACKUP_TYPE_UNSPECIFIED = 0; BACKUP_TYPE_FULL = 1; diff --git a/common/src/proto/descriptor.bin b/common/src/proto/descriptor.bin index 2bbd1451..b1d04d2a 100644 Binary files a/common/src/proto/descriptor.bin and b/common/src/proto/descriptor.bin differ diff --git a/common/src/proto/komp_ac.backup.rs b/common/src/proto/komp_ac.backup.rs index e8885b81..dab16035 100644 --- a/common/src/proto/komp_ac.backup.rs +++ b/common/src/proto/komp_ac.backup.rs @@ -37,15 +37,6 @@ pub struct ListDatabasesResponse { #[prost(message, repeated, tag = "2")] pub databases: ::prost::alloc::vec::Vec, } -#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] -pub struct ActivateDatabaseResponse { - #[prost(string, tag = "1")] - pub database_name: ::prost::alloc::string::String, - #[prost(bool, tag = "2")] - pub switching: bool, - #[prost(string, tag = "3")] - pub message: ::prost::alloc::string::String, -} #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct StartBackupRequest { #[prost(enumeration = "BackupType", tag = "1")] @@ -484,32 +475,6 @@ pub mod backup_service_client { ); self.inner.unary(req, path, codec).await } - pub async fn activate_database( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::unknown( - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic_prost::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/komp_ac.backup.BackupService/ActivateDatabase", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new("komp_ac.backup.BackupService", "ActivateDatabase"), - ); - self.inner.unary(req, path, codec).await - } } } /// Generated server implementations. @@ -575,13 +540,6 @@ pub mod backup_service_server { &self, request: tonic::Request, ) -> std::result::Result, tonic::Status>; - async fn activate_database( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; } #[derive(Debug)] pub struct BackupServiceServer { @@ -1024,52 +982,6 @@ pub mod backup_service_server { }; Box::pin(fut) } - "/komp_ac.backup.BackupService/ActivateDatabase" => { - #[allow(non_camel_case_types)] - struct ActivateDatabaseSvc(pub Arc); - impl< - T: BackupService, - > tonic::server::UnaryService - for ActivateDatabaseSvc { - type Response = super::ActivateDatabaseResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::activate_database(&inner, request) - .await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let method = ActivateDatabaseSvc(inner); - let codec = tonic_prost::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } _ => { Box::pin(async move { let mut response = http::Response::new( diff --git a/server b/server index ec9f1f19..8f18fa39 160000 --- a/server +++ b/server @@ -1 +1 @@ -Subproject commit ec9f1f19de0b25286afdfc27205f4afd3d0ef2a6 +Subproject commit 8f18fa39e342626c10b08e7409a1a6909c383f55