Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bma13 committed Jul 26, 2024
1 parent 84565d1 commit b74adfe
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cmd/ydbcp/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -316,10 +316,11 @@ func main() {
xlog.Error(ctx, "Error init DBConnector", zap.Error(err))
os.Exit(1)
}
clientConnector := client.NewClientYdbConnector(configInstance.ClientConnection)

server := server{
driver: dbConnector,
clientConn: client.NewClientYdbConnector(),
clientConn: clientConnector,
s3: configInstance.S3,
}
defer server.driver.Close(ctx)
Expand All @@ -341,7 +342,7 @@ func main() {

handlersRegistry := processor.NewOperationHandlerRegistry()
err = handlersRegistry.Add(
types.OperationTypeTB, handlers.MakeTBOperationHandler(dbConnector, client.NewClientYdbConnector()),
types.OperationTypeTB, handlers.MakeTBOperationHandler(dbConnector, clientConnector),
)
if err != nil {
xlog.Error(ctx, "failed to register TB handler", zap.Error(err))
Expand All @@ -350,7 +351,7 @@ func main() {

err = handlersRegistry.Add(
types.OperationTypeRB,
handlers.MakeRBOperationHandler(dbConnector, client.NewClientYdbConnector(), configInstance),
handlers.MakeRBOperationHandler(dbConnector, clientConnector, configInstance),
)

if err != nil {
Expand Down

0 comments on commit b74adfe

Please sign in to comment.