Add queuing system
This commit is contained in:
parent
bb86563ed9
commit
f2eacf41cf
6 changed files with 106 additions and 17 deletions
3
main.go
3
main.go
|
|
@ -18,11 +18,12 @@ func main() {
|
|||
a := NewApp(cfg)
|
||||
go a.Start()
|
||||
|
||||
go runQueue()
|
||||
|
||||
quit := make(chan os.Signal)
|
||||
signal.Notify(quit, os.Interrupt, syscall.SIGTERM)
|
||||
<-quit
|
||||
log.Println("Stopping the service...")
|
||||
a.Stop()
|
||||
log.Println("Stopped")
|
||||
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue