mirror of
https://github.com/offen/docker-volume-backup.git
synced 2024-11-14 18:40:26 +01:00
Possible error on scheduling profiling job is unchecked
This commit is contained in:
parent
01e41f45d1
commit
d3e82c0c5c
@ -191,7 +191,7 @@ func (c *command) runInForeground(profileCronExpression string) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if profileCronExpression != "" {
|
if profileCronExpression != "" {
|
||||||
cr.AddFunc(profileCronExpression, func() {
|
if _, err := cr.AddFunc(profileCronExpression, func() {
|
||||||
memStats := runtime.MemStats{}
|
memStats := runtime.MemStats{}
|
||||||
runtime.ReadMemStats(&memStats)
|
runtime.ReadMemStats(&memStats)
|
||||||
c.logger.Info(
|
c.logger.Info(
|
||||||
@ -205,7 +205,9 @@ func (c *command) runInForeground(profileCronExpression string) error {
|
|||||||
"memory_heap_sys",
|
"memory_heap_sys",
|
||||||
formatBytes(memStats.HeapSys, false),
|
formatBytes(memStats.HeapSys, false),
|
||||||
)
|
)
|
||||||
})
|
}); err != nil {
|
||||||
|
return fmt.Errorf("runInForeground: error adding profiling job: %w", err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var quit = make(chan os.Signal, 1)
|
var quit = make(chan os.Signal, 1)
|
||||||
|
Loading…
Reference in New Issue
Block a user