mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-04 13:07:36 +03:00
Add log for signal received
This commit is contained in:
parent
5713010984
commit
9ffd145e82
2 changed files with 2 additions and 0 deletions
|
@ -18,6 +18,7 @@ func startSignaler(ctx context.Context) func() error {
|
|||
signal.Notify(sigChan, os.Interrupt)
|
||||
select {
|
||||
case <-sigChan:
|
||||
log.Info(ctx, "Received termination signal", "signal", sig)
|
||||
return interrupted
|
||||
case <-ctx.Done():
|
||||
return nil
|
||||
|
|
|
@ -33,6 +33,7 @@ func startSignaler(ctx context.Context) func() error {
|
|||
select {
|
||||
case sig := <-sigChan:
|
||||
if sig != triggerScanSignal {
|
||||
log.Info(ctx, "Received termination signal", "signal", sig)
|
||||
return interrupted
|
||||
}
|
||||
log.Info(ctx, "Received signal, triggering a new scan", "signal", sig)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue