Skip to content

Commit

Permalink
chore(manager/database): rm unused cfg (#2798)
Browse files Browse the repository at this point in the history
Signed-off-by: Sasha Melentyev <[email protected]>
  • Loading branch information
sashamelentyev authored Oct 13, 2023
1 parent c025233 commit e25e35a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions manager/database/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (
)

const (
// Default name for the cluster.
// DefaultClusterName name for the cluster.
DefaultClusterName = "cluster-1"
)

Expand Down Expand Up @@ -98,7 +98,7 @@ func migrate(db *gorm.DB) error {
)
}

func seed(cfg *config.Config, db *gorm.DB) error {
func seed(db *gorm.DB) error {
// Create default scheduler cluster.
var schedulerClusterCount int64
if err := db.Model(models.SchedulerCluster{}).Count(&schedulerClusterCount).Error; err != nil {
Expand Down
2 changes: 1 addition & 1 deletion manager/database/mysql.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func newMyqsl(cfg *config.Config) (*gorm.DB, error) {
}

// Run seed.
if err := seed(cfg, db); err != nil {
if err := seed(db); err != nil {
return nil, err
}

Expand Down
2 changes: 1 addition & 1 deletion manager/database/postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func newPostgres(cfg *config.Config) (*gorm.DB, error) {
}

// Run seed.
if err := seed(cfg, db); err != nil {
if err := seed(db); err != nil {
return nil, err
}

Expand Down

0 comments on commit e25e35a

Please sign in to comment.