Only poll upstream when some polling is desired

This commit is contained in:
Tony Garnock-Jones 2016-11-21 17:05:17 +13:00
parent f6cb3282bd
commit 27d57b2c52
1 changed files with 2 additions and 1 deletions

View File

@ -77,7 +77,8 @@
(define/query-config max-upstream-redirects 5)
(on (asserted (later-than (+ (last-upstream-check) (* 1000 (or (poll-interval-seconds) 0)))))
(on #:when (poll-interval-seconds) (asserted (later-than (+ (last-upstream-check)
(* 1000 (or (poll-interval-seconds) 0)))))
(log-info "Checking upstream ~a" full-topic)
(define-values (resp response-body)
(web-request! 'get full-topic #:redirect-budget (max-upstream-redirects)))