sdnotify: Fix status for RELOADING
#1440
1 changed files with 2 additions and 0 deletions
|
@ -59,6 +59,8 @@ func FlagAndStatus(status string) error {
|
||||||
return fmt.Errorf("clock_gettime: %w", err)
|
return fmt.Errorf("clock_gettime: %w", err)
|
||||||
}
|
}
|
||||||
status += "\nMONOTONIC_USEC=" + strconv.FormatInt(ts.Nano()/1000, 10)
|
status += "\nMONOTONIC_USEC=" + strconv.FormatInt(ts.Nano()/1000, 10)
|
||||||
|
status += "\nSTATUS=RELOADING"
|
||||||
a-savchuk marked this conversation as resolved
|
|||||||
|
return Send(status)
|
||||||
}
|
}
|
||||||
status += "\nSTATUS=" + strings.TrimSuffix(status, "=1")
|
status += "\nSTATUS=" + strings.TrimSuffix(status, "=1")
|
||||||
return Send(status)
|
return Send(status)
|
||||||
|
|
Loading…
Reference in a new issue
Why not use this approach for other statuses as well? like READY=1 and STOPPING=1
Why using this approach in the first place? We already adding this line to
status
hereAh, I see, we added
MONOTONIC_USEC
tostatus
, so just trimming suffix=1
doesn't work anymore in case of reloading.But I still believe that for other statuses changing current behaviour is unnecessary.
This line is inside
if status == ReloadingEnabled
, so only reloading is affected.I think this answers both questions.