Skip to content

Commit

Permalink
refactor: rename the variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Muhammad Luthfi Fahlevi committed Sep 2, 2024
1 parent 7b5b0c1 commit fbc4a5e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cli/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ func runServer(ctx context.Context, cfg *Config) error {
LineageRepo: lineageRepository,
Worker: wrkr,
Logger: logger,
AssetConfig: cfg.Asset,
Config: cfg.Asset,
})
defer cancel()

Expand Down
8 changes: 4 additions & 4 deletions core/asset/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ type Service struct {
lineageRepository LineageRepository
worker Worker
logger log.Logger
assetConfig Config
config Config
cancelFnList []func()

assetOpCounter metric.Int64Counter
Expand All @@ -41,7 +41,7 @@ type ServiceDeps struct {
LineageRepo LineageRepository
Worker Worker
Logger log.Logger
AssetConfig Config
Config Config
}

func NewService(deps ServiceDeps) (service *Service, cancel func()) {
Expand All @@ -57,7 +57,7 @@ func NewService(deps ServiceDeps) (service *Service, cancel func()) {
lineageRepository: deps.LineageRepo,
worker: deps.Worker,
logger: deps.Logger,
assetConfig: deps.AssetConfig,
config: deps.Config,
cancelFnList: make([]func(), 0),

assetOpCounter: assetOpCounter,
Expand Down Expand Up @@ -153,7 +153,7 @@ func (s *Service) DeleteAssets(ctx context.Context, request DeleteAssetsRequest)
}

if !request.DryRun && total > 0 {
newCtx, cancel := context.WithTimeout(context.Background(), s.assetConfig.DeleteAssetsTimeout)
newCtx, cancel := context.WithTimeout(context.Background(), s.config.DeleteAssetsTimeout)
s.cancelFnList = append(s.cancelFnList, cancel)
go s.executeDeleteAssets(newCtx, deleteSQLExpr)
}
Expand Down

0 comments on commit fbc4a5e

Please sign in to comment.