move config watcher to config package

This commit is contained in:
0ceanSlim 2024-09-05 11:02:45 -04:00
parent 4e218c292a
commit 82a45048f5
2 changed files with 2 additions and 2 deletions

View File

@ -1,4 +1,4 @@
package utils package config
import ( import (
"fmt" "fmt"

View File

@ -25,7 +25,7 @@ func main() {
utils.EnsureFileExists("relay_metadata.json", "app/static/examples/relay_metadata.example.json") utils.EnsureFileExists("relay_metadata.json", "app/static/examples/relay_metadata.example.json")
restartChan := make(chan struct{}) restartChan := make(chan struct{})
go utils.WatchConfigFile("config.yml", restartChan) // Critical goroutine go config.WatchConfigFile("config.yml", restartChan) // Critical goroutine
signalChan := make(chan os.Signal, 1) signalChan := make(chan os.Signal, 1)
signal.Notify(signalChan, syscall.SIGINT, syscall.SIGTERM) signal.Notify(signalChan, syscall.SIGINT, syscall.SIGTERM)