Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Remove git poll loop verbose logging #700

Merged
merged 1 commit into from
Aug 21, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions daemon/loop.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,35 +51,28 @@ func (d *Daemon) GitPollLoop(stop chan struct{}, wg *sync.WaitGroup, logger log.
}

imagePollTimer := time.NewTimer(d.RegistryPollInterval)
loopLogger := log.NewContext(logger).With("thing", "git-poll-loop")

// Ask for a sync, and to poll images, straight away
d.askForSync()
d.askForImagePoll()
for {
select {
case <-stop:
loopLogger.Log("case", "stop")
logger.Log("stopping", "true")
return
case <-d.pollImagesSoon:
loopLogger.Log("case", "pollImagesSoon")
d.pollForNewImages(logger)
imagePollTimer.Stop()
imagePollTimer = time.NewTimer(d.RegistryPollInterval)
case <-imagePollTimer.C:
loopLogger.Log("case", "imagePollTimer")
d.askForImagePoll()
case <-d.syncSoon:
loopLogger.Log("case", "syncSoon")
pullThen(d.doSync)
case <-gitPollTimer.C:
loopLogger.Log("case", "gitPollTimer")
// Time to poll for new commits (unless we're already
// about to do that)
d.askForSync()
case job := <-d.Jobs.Ready():
loopLogger.Log("case", "jobReady")
jobLogger := log.NewContext(logger).With("jobID", job.ID)
jobLogger.Log("state", "in-progress")
// It's assumed that (successful) jobs will push commits
Expand Down