Open VaughnRupp opened 9 years ago
Almost a year later, this still makes sense to me, but it is big, and next release has to stay small and I am avoiding major DB work. I will revisit this, it is not needed, it just eliminates 1 table, and is an OCD purist thing...
If the method queue checks times and does not run methods from the future, then the schedule queue could write the queue entries ahead of time. WHY??? Because the schedule queue only runs once per minute, and the method queue runs a couple times a seconds... So this would allow us to write choreographed scripts that are timed to the second, and the method queue would execute them almost exactly when they need to be ran, where the scheduler cannot do that.
So a script could take advantage without using the scheduler. Add queue for: Now + 30 seconds, Turn Siren On Now + 60 seconds, Turn Siren Off Now + 61 Seconds, Say "Warning Intruder Alert, Warning!" Now + 65 Seconds, Turn Siren On
Etc...