Functions for event polling. This is different from event listeners, because pollers can decide for themselves when they want to fetch the next event. This is useful for backpressure, when there is limited capacity to handle events.
Functions for event polling. This is different from event listeners, because pollers can decide for themselves when they want to fetch the next event. This is useful for backpressure, when there is limited capacity to handle events.
(poll-loop {:keys [poll-interval] :or {poll-interval 1000} :as conf}
router
running?
max-reached?)
Starts a poll loop that takes events from an event receiver as long as
the max number of simultaneous builds has not been reached. When a
build finishes, a new event is taken from the queue. This loop should
only receive events as configured in the event-types
property. The
running?
atom allows to stop the loop (e.g. on shutdown), whereas
the max-reached?
function returns true
whenever maximum capacity is
reached. As long as this is the case, no new events are polled.
Starts a poll loop that takes events from an event receiver as long as the max number of simultaneous builds has not been reached. When a build finishes, a new event is taken from the queue. This loop should only receive events as configured in the `event-types` property. The `running?` atom allows to stop the loop (e.g. on shutdown), whereas the `max-reached?` function returns `true` whenever maximum capacity is reached. As long as this is the case, no new events are polled.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close