]> source.dussan.org Git - gitea.git/commit
Add Graceful shutdown for Windows and hooks for shutdown of goroutines (#8964)
authorzeripath <art27@cantab.net>
Thu, 21 Nov 2019 18:32:02 +0000 (18:32 +0000)
committertechknowlogick <techknowlogick@gitea.io>
Thu, 21 Nov 2019 18:32:02 +0000 (13:32 -0500)
commitcbaa1de9ec8ab1baa49357b660fab16a68097c84
tree5f481d73c95ae24b91e7bb03abaa5cf921f806b5
parentd7ac9727bb5046118915cbb26b2dac1b7b27c9d4
Add Graceful shutdown for Windows and hooks for shutdown of goroutines (#8964)

* Graceful Shutdown for windows and others

Restructures modules/graceful, adding shutdown for windows, removing and
replacing the old minwinsvc code.

Creates a new waitGroup - terminate which allows for goroutines to
finish up after the shutdown of the servers.

Shutdown and terminate hooks are added for goroutines.

* Remove unused functions - these can be added in a different PR

* Add startup timeout functionality

* Document STARTUP_TIMEOUT
32 files changed:
cmd/web.go
cmd/web_graceful.go
cmd/web_windows.go [deleted file]
custom/conf/app.ini.sample
docs/content/doc/advanced/config-cheat-sheet.en-us.md
models/repo_indexer.go
modules/graceful/cleanup.go [deleted file]
modules/graceful/graceful_windows.go [deleted file]
modules/graceful/manager.go [new file with mode: 0644]
modules/graceful/manager_unix.go [new file with mode: 0644]
modules/graceful/manager_windows.go [new file with mode: 0644]
modules/graceful/net.go [deleted file]
modules/graceful/net_unix.go [new file with mode: 0644]
modules/graceful/net_windows.go [new file with mode: 0644]
modules/graceful/restart.go [deleted file]
modules/graceful/restart_unix.go [new file with mode: 0644]
modules/graceful/server.go
modules/graceful/server_hooks.go
modules/graceful/server_http.go
modules/graceful/server_signals.go [deleted file]
modules/indexer/issues/indexer.go
modules/minwinsvc/LICENSE [deleted file]
modules/minwinsvc/README.md [deleted file]
modules/minwinsvc/minwinsvc.go [deleted file]
modules/minwinsvc/svc_other.go [deleted file]
modules/minwinsvc/svc_windows.go [deleted file]
modules/setting/setting.go
modules/ssh/ssh_graceful.go
modules/ssh/ssh_windows.go [deleted file]
vendor/golang.org/x/sys/windows/svc/debug/log.go [new file with mode: 0644]
vendor/golang.org/x/sys/windows/svc/debug/service.go [new file with mode: 0644]
vendor/modules.txt