Commit 2019ac5a authored by Sebastian Stark's avatar Sebastian Stark

make initial wait time a const and log info about it

parent 70653a72
......@@ -16,6 +16,8 @@ import (
"time"
)
const initialWait = time.Second * 30
var config *Config
var logger *log.Logger
......@@ -66,10 +68,11 @@ func subcmdRun() (ferr error) {
if !config.NoWait {
sigc := make(chan os.Signal, 1)
signal.Notify(sigc, syscall.SIGINT, syscall.SIGTERM)
log.Printf("waiting %s before making snapshots\n", initialWait)
select {
case <-sigc:
return errors.New("-> Early exit")
case <-time.After(time.Second * 30):
case <-time.After(initialWait):
}
}
createExit := make(chan bool)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment