Add support for module sleep mode

This commit is contained in:
Vladimir Stoilov 2023-04-19 17:38:56 +02:00
parent 98574e44c4
commit 0ed865f4e4
6 changed files with 139 additions and 6 deletions

View file

@ -443,6 +443,10 @@ func (t *Task) addToSchedule(overtime bool) {
}
func waitUntilNextScheduledTask() <-chan time.Time {
if sleepMode.IsSet() {
<-taskSchedulerSleepModeExitChannel
}
scheduleLock.Lock()
defer scheduleLock.Unlock()