diff options
Diffstat (limited to 'database.go')
-rw-r--r-- | database.go | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/database.go b/database.go index ea11cfa..5d9181c 100644 --- a/database.go +++ b/database.go @@ -7,11 +7,9 @@ import ( "path/filepath" "io" "os" - "os/signal" "os/user" "os/exec" "strconv" - "syscall" "database/sql" _ "github.com/go-sql-driver/mysql" @@ -41,17 +39,6 @@ func setupDatabase() *sql.DB { migrate(db) - // allow graceful shutdown - var listener = make(chan os.Signal) - signal.Notify(listener, syscall.SIGTERM) - signal.Notify(listener, syscall.SIGINT) - go func() { - signal := <-listener - log.Printf("\nGot signal '%+v'. Shutting down ...\n", signal) - dbCleanup(db) - os.Exit(0) // TODO this does not belong to a database - write utils file 'shutdown.go' - }() - log.Printf("Connected to database: %s\n", target) return db |