[#1440] sdnotify: Fix status for RELOADING
All checks were successful
Tests and linters / Run gofumpt (pull_request) Successful in 2m17s
DCO action / DCO (pull_request) Successful in 3m31s
Pre-commit hooks / Pre-commit (pull_request) Successful in 3m41s
Tests and linters / Staticcheck (pull_request) Successful in 4m4s
Vulncheck / Vulncheck (pull_request) Successful in 4m11s
Tests and linters / gopls check (pull_request) Successful in 4m35s
Build / Build Components (pull_request) Successful in 4m46s
Tests and linters / Lint (pull_request) Successful in 4m45s
Tests and linters / Tests (pull_request) Successful in 6m36s
Tests and linters / Tests with -race (pull_request) Successful in 7m47s

Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
This commit is contained in:
Anton Nikiforov 2024-10-21 14:12:02 +03:00
parent ed13387c0e
commit 60911b7cb1

View file

@ -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"
return Send(status)
} }
status += "\nSTATUS=" + strings.TrimSuffix(status, "=1") status += "\nSTATUS=" + strings.TrimSuffix(status, "=1")
return Send(status) return Send(status)