From 22fa34c8196d6efb4cd5fcb871eb7b90d2e895a4 Mon Sep 17 00:00:00 2001 From: Brian Ginsburg Date: Tue, 17 Dec 2024 19:30:49 -0800 Subject: [PATCH] chore: Rename remove offer method --- pkg/solver/controller.go | 3 ++- pkg/solver/server.go | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/solver/controller.go b/pkg/solver/controller.go index c722e0f9..34de483f 100644 --- a/pkg/solver/controller.go +++ b/pkg/solver/controller.go @@ -404,7 +404,8 @@ func (controller *SolverController) addResourceOffer(resourceOffer data.Resource return ret, nil } -func (controller *SolverController) removeResourceOfferByResourceProvider(ID string) error { +// Remove resource offers in an unmatched DealNegotiating[0] state +func (controller *SolverController) removeUnmatchedResourceOffers(ID string) error { controller.log.Info("remove resource offer", ID) resourceOffers, err := controller.store.GetResourceOffers(store.GetResourceOffersQuery{ ResourceProvider: ID, diff --git a/pkg/solver/server.go b/pkg/solver/server.go index 29bd5d30..57cf63d7 100644 --- a/pkg/solver/server.go +++ b/pkg/solver/server.go @@ -168,7 +168,7 @@ func (solverServer *solverServer) disconnectCB(connParams http.WSConnectionParam CountryCode: connParams.CountryCode, IP: connParams.IP, }) - solverServer.controller.removeResourceOfferByResourceProvider(connParams.ID) + solverServer.controller.removeUnmatchedResourceOffers(connParams.ID) } }