diff options
author | Frédéric Guillot <fred@miniflux.net> | 2018-01-02 22:40:26 -0800 |
---|---|---|
committer | Frédéric Guillot <fred@miniflux.net> | 2018-01-02 22:40:26 -0800 |
commit | d2b137d0386d89fd3f3cef333b9a6fd1d5ab4148 (patch) | |
tree | ddf37cfda1c3546b06b85f62c27375a47f15191e /daemon | |
parent | 0394c1a2b2db8a42f181769a4af818b637846206 (diff) |
Handle SIGTERM signal
Diffstat (limited to 'daemon')
-rw-r--r-- | daemon/daemon.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/daemon/daemon.go b/daemon/daemon.go index 494e035..1fb99b1 100644 --- a/daemon/daemon.go +++ b/daemon/daemon.go @@ -8,6 +8,7 @@ import ( "context" "os" "os/signal" + "syscall" "time" "github.com/miniflux/miniflux/config" @@ -23,6 +24,7 @@ func Run(cfg *config.Config, store *storage.Storage) { stop := make(chan os.Signal, 1) signal.Notify(stop, os.Interrupt) + signal.Notify(stop, syscall.SIGTERM) feedHandler := feed.NewFeedHandler(store) pool := scheduler.NewWorkerPool(feedHandler, cfg.GetInt("WORKER_POOL_SIZE", config.DefaultWorkerPoolSize)) |