mirror of
https://github.com/edgebox-iot/edgeboxctl.git
synced 2026-09-25 14:20:56 +02:00
Moved sleep instruction to after execution of lined task
This commit is contained in:
+5
-3
@@ -111,10 +111,8 @@ func systemIterator(name *string, tick int) {
|
|||||||
log.Printf("System not ready. Next try will be executed in 60 seconds")
|
log.Printf("System not ready. Next try will be executed in 60 seconds")
|
||||||
time.Sleep(defaultNotReadySleepTime)
|
time.Sleep(defaultNotReadySleepTime)
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
tasks.ExecuteSchedules(tick)
|
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()
|
nextTask := tasks.GetNextTask()
|
||||||
if nextTask.Task != "" {
|
if nextTask.Task != "" {
|
||||||
log.Printf("Executing task %s / Args: %s", nextTask.Task, nextTask.Args)
|
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.")
|
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)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user