Skip to content

Commit

Permalink
update gitwatch and add back the initial clone channel reads to ensur…
Browse files Browse the repository at this point in the history
…e repos are cloned before continuing
  • Loading branch information
Southclaws committed Feb 16, 2020
1 parent 0f2b7db commit 364e1ff
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/Southclaws/wadsworth
go 1.13

require (
github.com/Southclaws/gitwatch v1.3.1
github.com/Southclaws/gitwatch v1.3.2
github.com/cpuguy83/go-md2man/v2 v2.0.0 // indirect
github.com/frankban/quicktest v1.4.1 // indirect
github.com/go-test/deep v1.0.2 // indirect
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ github.com/Southclaws/gitwatch v1.3.0 h1:oD++CTkgMoX7SEuk2/Vy6Y8iy7xFmsjKT7e6AiA
github.com/Southclaws/gitwatch v1.3.0/go.mod h1:xCudUiwWxkDYZ69cEhlTwAKIzbG1OpnA/s/pjPIW6gU=
github.com/Southclaws/gitwatch v1.3.1 h1:4XtiujsnxHKSKze3Tb5sWwTdBxSVW/JLbK54ruJ2nBU=
github.com/Southclaws/gitwatch v1.3.1/go.mod h1:xCudUiwWxkDYZ69cEhlTwAKIzbG1OpnA/s/pjPIW6gU=
github.com/Southclaws/gitwatch v1.3.2 h1:zmt571n8ItXgkRJPyCFtFjcymvsFOGcm7JnHNpFDP+8=
github.com/Southclaws/gitwatch v1.3.2/go.mod h1:xCudUiwWxkDYZ69cEhlTwAKIzbG1OpnA/s/pjPIW6gU=
github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7 h1:uSoVVbwJiQipAclBbw+8quDsfcvFjOpI5iCf4p/cqCs=
github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7/go.mod h1:6zEj6s6u/ghQa61ZWa/C2Aw3RkjiTBOix7dkqa1VLIs=
github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239 h1:kFOfPq6dUM1hTo4JG6LR5AXSUEsOjtdm0kw0FtQtMJA=
Expand Down
6 changes: 6 additions & 0 deletions service/reconfigure.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ func (app *App) watchConfig() (err error) {
}()
zap.L().Debug("created new config watcher, awaiting setup")

<-app.configWatcher.InitialDone

return
}

Expand Down Expand Up @@ -129,6 +131,8 @@ func (app *App) watchTargets() (err error) {
}()
zap.L().Debug("created targets watcher, awaiting setup")

<-app.targetsWatcher.InitialDone

return
}

Expand All @@ -138,6 +142,8 @@ func getNewState(path, hostname string, fallback config.State) (state config.Sta
state, err := config.ConfigFromDirectory(path, hostname)
if err != nil {
zap.L().Error("failed to construct config from repo, falling back to original state",
zap.String("path", path),
zap.String("hostname", hostname),
zap.Error(err))

state = fallback
Expand Down

0 comments on commit 364e1ff

Please sign in to comment.