Add comments to describe functions and types
This commit is contained in:
@@ -11,10 +11,12 @@ import (
|
||||
|
||||
const frequency = 3 * time.Second // Figure out a sensible frequency!
|
||||
|
||||
// Starts a background ticker to run background tasks. Uses the frequency configured in the background/ticker.go file
|
||||
func InitTicker(cfg *helpers.Configuration, stop <-chan struct{}) {
|
||||
go runTicker(cfg, stop)
|
||||
}
|
||||
|
||||
// Runs the ticker and handles tick events
|
||||
func runTicker(cfg *helpers.Configuration, stop <-chan struct{}) {
|
||||
log.Msg.Sugar().Infof("Starting background ticker, runs every %s", frequency)
|
||||
ticker := time.NewTicker(frequency)
|
||||
|
||||
Reference in New Issue
Block a user