Skip to content
This repository has been archived by the owner on Apr 17, 2024. It is now read-only.

Commit

Permalink
Merge pull request #64 from vidar-team/dev [SKIP CI]
Browse files Browse the repository at this point in the history
fix: check manager [SKIP CI]
  • Loading branch information
wuhan005 authored Aug 13, 2020
2 parents e7bcd62 + 66d30e7 commit 726d3a4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions internal/bootstrap/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ func LinkStart() {
// Init MySQL database.
db.InitMySQL()

// Check manager
install.InitManager()

// Refresh the dynamic config from the database.
dynamic_config.Init()

Expand Down
2 changes: 1 addition & 1 deletion internal/install/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ func GenerateConfigFileGuide(lang string) ([]byte, error) {
return wr.Bytes(), nil
}

func initManager() {
func InitManager() {
var managerCount int
db.MySQL.Model(&db.Manager{}).Count(&managerCount)
if managerCount == 0 {
Expand Down

0 comments on commit 726d3a4

Please sign in to comment.