Skip to content

Commit 54c3da8

Browse files
author
Tsotne Tabidze
committed
Remove grpc keyword where not necessary
Signed-off-by: Tsotne Tabidze <tsotne@tecton.ai>
1 parent faa44e6 commit 54c3da8

3 files changed

Lines changed: 8 additions & 11 deletions

File tree

go/embedded/online_features.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ import (
2929
)
3030

3131
type OnlineFeatureService struct {
32-
fs *feast.FeatureStore
33-
grpcStopCh chan os.Signal
32+
fs *feast.FeatureStore
33+
serverStopCh chan os.Signal
3434
}
3535

3636
type OnlineFeatureServiceConfig struct {
@@ -67,7 +67,7 @@ func NewOnlineFeatureService(conf *OnlineFeatureServiceConfig, transformationCal
6767
c := make(chan os.Signal, 1)
6868
signal.Notify(c, syscall.SIGINT, syscall.SIGTERM)
6969

70-
return &OnlineFeatureService{fs: fs, grpcStopCh: c}
70+
return &OnlineFeatureService{fs: fs, serverStopCh: c}
7171
}
7272

7373
func (s *OnlineFeatureService) GetEntityTypesMap(featureRefs []string) (map[string]int32, error) {
@@ -279,7 +279,7 @@ func (s *OnlineFeatureService) StartGprcServerWithLogging(host string, port int,
279279

280280
go func() {
281281
// As soon as these signals are received from OS, try to gracefully stop the gRPC server
282-
<-s.grpcStopCh
282+
<-s.serverStopCh
283283
fmt.Println("Stopping the gRPC server...")
284284
grpcServer.GracefulStop()
285285
if loggingService != nil {
@@ -324,7 +324,7 @@ func (s *OnlineFeatureService) StartHttpServerWithLogging(host string, port int,
324324

325325
go func() {
326326
// As soon as these signals are received from OS, try to gracefully stop the gRPC server
327-
<-s.grpcStopCh
327+
<-s.serverStopCh
328328
fmt.Println("Stopping the HTTP server...")
329329
err := ser.Stop()
330330
if err != nil {
@@ -336,7 +336,7 @@ func (s *OnlineFeatureService) StartHttpServerWithLogging(host string, port int,
336336
}
337337

338338
func (s *OnlineFeatureService) Stop() {
339-
s.grpcStopCh <- syscall.SIGINT
339+
s.serverStopCh <- syscall.SIGINT
340340
}
341341

342342
/*

sdk/python/feast/embedded_go/online_features_service.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,10 +177,7 @@ def start_http_server(
177177
else:
178178
self._service.StartHttpServer(host, port)
179179

180-
def stop_http_server(self):
181-
self._service.Stop()
182-
183-
def stop_grpc_server(self):
180+
def stop_server(self):
184181
self._service.Stop()
185182

186183

sdk/python/tests/integration/e2e/test_go_feature_server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def grpc_server_port(environment, initialized_registry):
9393
)
9494

9595
yield port
96-
embedded.stop_grpc_server()
96+
embedded.stop_server()
9797
# wait for graceful stop
9898
time.sleep(2)
9999

0 commit comments

Comments
 (0)