mirror of
https://github.com/miniflux/v2.git
synced 2025-08-01 17:38:37 +00:00
Handle SIGTERM signal
This commit is contained in:
parent
0394c1a2b2
commit
d2b137d038
1 changed files with 2 additions and 0 deletions
|
@ -8,6 +8,7 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"os"
|
"os"
|
||||||
"os/signal"
|
"os/signal"
|
||||||
|
"syscall"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/miniflux/miniflux/config"
|
"github.com/miniflux/miniflux/config"
|
||||||
|
@ -23,6 +24,7 @@ func Run(cfg *config.Config, store *storage.Storage) {
|
||||||
|
|
||||||
stop := make(chan os.Signal, 1)
|
stop := make(chan os.Signal, 1)
|
||||||
signal.Notify(stop, os.Interrupt)
|
signal.Notify(stop, os.Interrupt)
|
||||||
|
signal.Notify(stop, syscall.SIGTERM)
|
||||||
|
|
||||||
feedHandler := feed.NewFeedHandler(store)
|
feedHandler := feed.NewFeedHandler(store)
|
||||||
pool := scheduler.NewWorkerPool(feedHandler, cfg.GetInt("WORKER_POOL_SIZE", config.DefaultWorkerPoolSize))
|
pool := scheduler.NewWorkerPool(feedHandler, cfg.GetInt("WORKER_POOL_SIZE", config.DefaultWorkerPoolSize))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue