From 618afce05c52859c61d9ce6d57dab8c9c5a8b995 Mon Sep 17 00:00:00 2001 From: shay23b Date: Tue, 5 Dec 2023 16:22:38 +0200 Subject: [PATCH] from cloud --- server/memphis_cloud.go | 8 ++++++++ server/memphis_handlers_stations.go | 5 +++++ server/memphis_handlers_user_mgmt.go | 6 +++++- 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/server/memphis_cloud.go b/server/memphis_cloud.go index f4fe1ec83..0bfc6c973 100644 --- a/server/memphis_cloud.go +++ b/server/memphis_cloud.go @@ -2382,3 +2382,11 @@ func getUsageLimitProduersLimitPerStation(tenantName, stationName string) (float func (s *Server) GetConnectorsByStationAndPartition(stationID, partitionNumber, numOfPartitions int) ([]map[string]string, error) { return []map[string]string{}, nil } + +func deleteConnectorsStationResources(tenantName string, stationID int) error { + return nil +} + +func deleteConnectorsTenantResources(tenantName string) error { + return nil +} diff --git a/server/memphis_handlers_stations.go b/server/memphis_handlers_stations.go index 1a7ba0640..b955ccdf2 100644 --- a/server/memphis_handlers_stations.go +++ b/server/memphis_handlers_stations.go @@ -182,6 +182,11 @@ func removeStationResources(s *Server, station models.Station, shouldDeleteStrea return err } + err = deleteConnectorsStationResources(station.TenantName, station.ID) + if err != nil { + return err + } + return nil } diff --git a/server/memphis_handlers_user_mgmt.go b/server/memphis_handlers_user_mgmt.go index 9dd76cd5e..ef57bf312 100644 --- a/server/memphis_handlers_user_mgmt.go +++ b/server/memphis_handlers_user_mgmt.go @@ -160,7 +160,11 @@ func removeTenantResources(tenantName string, user models.User) error { if err != nil { return err } - // TODO: send response of DeleteAndGetAttachedFunctionsByStation to microservice to delete + + err = deleteConnectorsTenantResources(tenantName) + if err != nil { + return err + } err = db.RemoveStationsByTenant(tenantName) if err != nil {