all database operations now take a context.Context, which is propagated through from sources
This commit is contained in:
@@ -124,9 +124,6 @@ func main() {
|
||||
closer = ui.SetupAmContext()
|
||||
defer closer()
|
||||
|
||||
// Set up Echo.
|
||||
e := setupEcho()
|
||||
|
||||
// Set up to trap SIGINT and shut down gracefully
|
||||
ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt)
|
||||
defer stop()
|
||||
@@ -138,6 +135,9 @@ func main() {
|
||||
ampool.Shutdown()
|
||||
}()
|
||||
|
||||
// Set up Echo.
|
||||
e := setupEcho()
|
||||
|
||||
// Start server
|
||||
go func() {
|
||||
if err := e.Start(":1323"); err != nil && err != http.ErrServerClosed {
|
||||
|
||||
Reference in New Issue
Block a user