Change name of maintenance worker to "prism" #154

See https://twitter.com/browseyourlife/status/1265289044856123393

Signed-off-by: Michael Mayer <michael@liquidbytes.net>
This commit is contained in:
Michael Mayer
2020-05-26 19:27:29 +02:00
parent 968cd71f34
commit 1df0d9a549
13 changed files with 235 additions and 86 deletions

View File

@@ -21,12 +21,12 @@ func Start(conf *config.Config) {
case <-stop:
log.Info("shutting down workers")
ticker.Stop()
mutex.GroomWorker.Cancel()
mutex.PrismWorker.Cancel()
mutex.ShareWorker.Cancel()
mutex.SyncWorker.Cancel()
return
case <-ticker.C:
StartGroom(conf)
StartPrism(conf)
StartShare(conf)
StartSync(conf)
}
@@ -39,11 +39,11 @@ func Stop() {
stop <- true
}
// StartGroom runs the groom worker once.
func StartGroom(conf *config.Config) {
// StartPrism runs the prism worker once.
func StartPrism(conf *config.Config) {
if !mutex.WorkersBusy() {
go func() {
worker := NewGroom(conf)
worker := NewPrism(conf)
if err := worker.Start(); err != nil {
log.Error(err)
}