mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-04 21:17:37 +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)
|
signal.Notify(sigChan, os.Interrupt)
|
||||||
select {
|
select {
|
||||||
case <-sigChan:
|
case <-sigChan:
|
||||||
|
log.Info(ctx, "Received termination signal", "signal", sig)
|
||||||
return interrupted
|
return interrupted
|
||||||
case <-ctx.Done():
|
case <-ctx.Done():
|
||||||
return nil
|
return nil
|
||||||
|
|
|
@ -33,6 +33,7 @@ func startSignaler(ctx context.Context) func() error {
|
||||||
select {
|
select {
|
||||||
case sig := <-sigChan:
|
case sig := <-sigChan:
|
||||||
if sig != triggerScanSignal {
|
if sig != triggerScanSignal {
|
||||||
|
log.Info(ctx, "Received termination signal", "signal", sig)
|
||||||
return interrupted
|
return interrupted
|
||||||
}
|
}
|
||||||
log.Info(ctx, "Received signal, triggering a new scan", "signal", sig)
|
log.Info(ctx, "Received signal, triggering a new scan", "signal", sig)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue