Update groveStreams.groovy
authorSeyed Amir Hossein Aqajari <amiraj.95@uci.edu>
Mon, 29 Jul 2019 01:25:26 +0000 (18:25 -0700)
committerGitHub Enterprise <noreply@github.uci.edu>
Mon, 29 Jul 2019 01:25:26 +0000 (18:25 -0700)
third-party/groveStreams.groovy

index 16b1f2b..442560d 100755 (executable)
@@ -159,11 +159,11 @@ def initialize() {
        subscribe(location, "sunsetTime", rescheduleIfNeeded)
        subscribe(app, appTouch)
 
-       rescheduleIfNeeded()   
+       //rescheduleIfNeeded()   
 }
 
 def appTouch(evt) {
-       rescheduleIfNeeded()
+       rescheduleIfNeeded(evt)
        processQueue()
        def queue = []
        atomicState.queue=queue
@@ -182,7 +182,7 @@ def rescheduleIfNeeded(evt) {
        if (((atomicState?.poll["last"]?:0) + (delay * 60000) < currentTime) && canSchedule()) {
                log.info "rescheduleIfNeeded>scheduling processQueue in ${delay} minutes.."
                unschedule        
-               schedule("0 0/${delay} * * * ?", processQueue)
+               schedule("14:00", processQueue)
        }
        // Update rescheduled state