mirror of
https://github.com/hibiken/asynq.git
synced 2026-06-19 10:37:39 +08:00
Update log messages on shutdown
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package asynq
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"os/signal"
|
||||
"sync"
|
||||
@@ -49,6 +50,7 @@ func (bg *Background) Run(handler TaskHandler) {
|
||||
sigs := make(chan os.Signal, 1)
|
||||
signal.Notify(sigs, os.Interrupt, os.Kill)
|
||||
<-sigs
|
||||
fmt.Printf("\nStarting graceful shutdown...\n")
|
||||
}
|
||||
|
||||
// starts the background-task processing.
|
||||
|
||||
Reference in New Issue
Block a user