mirror of
https://github.com/Theodor-Springmann-Stiftung/kgpz_web.git
synced 2025-10-29 00:55:32 +00:00
Intoroduced concurrncy in filereading
This commit is contained in:
10
kgpz_web.go
10
kgpz_web.go
@@ -35,17 +35,12 @@ func main() {
|
||||
}
|
||||
|
||||
kgpz := app.NewKGPZ(cfg)
|
||||
Bootstrap(kgpz)
|
||||
kgpz.Init()
|
||||
|
||||
server := server.Start(kgpz, cfg)
|
||||
Start(kgpz, server)
|
||||
}
|
||||
|
||||
func Bootstrap(k *app.KGPZ) {
|
||||
k.InitRepo()
|
||||
k.Serialize()
|
||||
}
|
||||
|
||||
func Start(k *app.KGPZ, s *server.Server) {
|
||||
s.Start()
|
||||
|
||||
@@ -83,8 +78,7 @@ func Start(k *app.KGPZ, s *server.Server) {
|
||||
fmt.Println("Pulling repo.")
|
||||
k.Pull()
|
||||
} else if input == "q" {
|
||||
s := os.Signal(syscall.SIGTERM)
|
||||
sigs <- s
|
||||
sigs <- os.Signal(syscall.SIGTERM)
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
||||
Reference in New Issue
Block a user