378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
|
(lambda (a b)(equal? (car a)(car b))))) ;; remove duplicates by target
)
;; look in runstarts for matching runs by target and contour
;; get the timestamp for when that run started and pass it
;; to the rule logic here where "ruletype" will be applied
;; if it comes back "changed" then proceed to register the runs
(case (string->symbol ruletype)
((scheduled)
(if (not (alist-ref 'cron val-alist)) ;; gotta have cron spec
(print "ERROR: bad sense spec \"" (string-intersperse sense " ") "\" params: " val-alist)
(let* ((run-name (alist-ref 'run-name val-alist))
(crontab (alist-ref 'cron val-alist))
(action (alist-ref 'action val-alist))
(last-run (if (null? starttimes) ;; never run
|
|
>
|
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
|
(lambda (a b)(equal? (car a)(car b))))) ;; remove duplicates by target
)
;; look in runstarts for matching runs by target and contour
;; get the timestamp for when that run started and pass it
;; to the rule logic here where "ruletype" will be applied
;; if it comes back "changed" then proceed to register the runs
(case (string->symbol (or ruletype "no-such-rule"))
((no-such-rule) (print "ERROR: no such rule for " sense))
((scheduled)
(if (not (alist-ref 'cron val-alist)) ;; gotta have cron spec
(print "ERROR: bad sense spec \"" (string-intersperse sense " ") "\" params: " val-alist)
(let* ((run-name (alist-ref 'run-name val-alist))
(crontab (alist-ref 'cron val-alist))
(action (alist-ref 'action val-alist))
(last-run (if (null? starttimes) ;; never run
|