GwentAPI / gwentapi

The code for GwentAPI
https://gwentapi.com
BSD 3-Clause "New" or "Revised" License
47 stars 1 forks source link

Implement graceful #1

Closed Tri125 closed 7 years ago

Tri125 commented 8 years ago

https://github.com/tylerb/graceful

Implementing graceful would allow the app to gracefully shutdown.

Tri125 commented 7 years ago

The package isn't necessary since Go 1.8

The HTTP Server now has support for graceful shutdown using the new Server.Shutdown method and abrupt shutdown using the new Server.Close method.

But the code is still running 1.7.

Tri125 commented 7 years ago

Fun fact, the project is now being compiled with Go 1.8 but it's still using an old version of goa (the framework that handles everything) that doesn't seems to support it.

Goa used to have the graceful middleware but I can't actually find it or how to use it properly.

Tri125 commented 7 years ago

Now that the program is using a custom server and mux, it was straightforward to implement graceful shutdown.

Fixed in 845ab83d918a216bbf4a02e8976c6e1134bf8bb2.