feat(integrations): exit on error

This commit is contained in:
Taha Yassine Kraiem 2022-02-09 15:02:36 +01:00
parent 6189883c5d
commit c4d767a6d0

View file

@ -93,6 +93,9 @@ func main() {
}
case err := <-listener.Errors:
log.Printf("Postgres listen error: %v\n", err)
listener.Close()
pg.Close()
os.Exit(0)
case iPointer := <-listener.Integrations:
log.Printf("Integration update: %v\n", *iPointer)
err := manager.Update(iPointer)