Finish conversion of poke.rkt to timestate

This commit is contained in:
Tony Garnock-Jones 2016-11-21 14:40:25 +13:00
parent c65fc0220c
commit 330721480f
1 changed files with 3 additions and 4 deletions

View File

@ -8,7 +8,7 @@
(require net/url)
(require net/uri-codec)
(require/activate syndicate/drivers/timer)
(require/activate syndicate/drivers/timestate)
(require/activate syndicate/drivers/web)
(require (except-in "private/util.rkt" vh))
@ -84,9 +84,8 @@
(printf "~a ==> ~a ~v ~v\n" id verb path body)
(react (stop-when (message (web-response-complete id $resp $body))
(printf "~a <== ~v ~v\n" id resp body))
(on-start (send! (set-timer (list 'incoming-tracer id) 1000 'relative)))
(stop-when (message (timer-expired (list 'incoming-tracer id) _))
(printf "~a <== timeout\n" id)))))
(stop-when-timeout 1000
(printf "~a <== timeout\n" id)))))
(define (spawn-subscriber topic)
(request! 'post `("hub" ())