mirror of
https://github.com/0ceanSlim/grain.git
synced 2024-10-30 01:26:32 +00:00
move config watcher to config package
This commit is contained in:
parent
4e218c292a
commit
82a45048f5
@ -1,4 +1,4 @@
|
|||||||
package utils
|
package config
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
2
main.go
2
main.go
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user