Moved sleep instruction to after execution of lined task
parent
3cc670b823
commit
57a9ef3eed
|
@ -111,10 +111,8 @@ func systemIterator(name *string, tick int) {
|
|||
log.Printf("System not ready. Next try will be executed in 60 seconds")
|
||||
time.Sleep(defaultNotReadySleepTime)
|
||||
} else {
|
||||
|
||||
tasks.ExecuteSchedules(tick)
|
||||
// Wait about 1 second before resumming operations.
|
||||
log.Printf("Next instruction will be executed 1 second")
|
||||
time.Sleep(defaultSleepTime)
|
||||
nextTask := tasks.GetNextTask()
|
||||
if nextTask.Task != "" {
|
||||
log.Printf("Executing task %s / Args: %s", nextTask.Task, nextTask.Args)
|
||||
|
@ -123,6 +121,10 @@ func systemIterator(name *string, tick int) {
|
|||
log.Printf("No tasks to execute.")
|
||||
}
|
||||
|
||||
// Wait about 1 second before resumming operations.
|
||||
log.Printf("Next instruction will be executed 1 second")
|
||||
time.Sleep(defaultSleepTime)
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue