Mailman-style event handling
Mailman-style event handling
(add-router broker routes opts)
Registers a listener for given routes in the broker
Registers a listener for given routes in the broker
Updates build state to initializing
. Returns a consolidated build/updated
event.
Updates build state to `initializing`. Returns a consolidated `build/updated` event.
(check-credits ctx)
Checks if credits are available. Returns either a build/pending or a build/failed.
Checks if credits are available. Returns either a build/pending or a build/failed.
Interceptor that fetches available credits for the customer associated with the build. Assumes that the db is in the context.
Interceptor that fetches available credits for the customer associated with the build. Assumes that the db is in the context.
(merge-routes routes & others)
Merges multiple routes together into one routing config
Merges multiple routes together into one routing config
(post-events mm events)
Posts events using the broker in the mailman component
Posts events using the broker in the mailman component
(queue-build ctx)
Adds the build to the build queue, where it will be picked up by a runner when capacity is available.
Adds the build to the build queue, where it will be picked up by a runner when capacity is available.
Assuming the result contains a build with credits, creates a credit consumption for the associated customer.
Assuming the result contains a build with credits, creates a credit consumption for the associated customer.
Saves the job found in the result build by id specified in the event.
Saves the job found in the result build by id specified in the event.
Logs event info, for debugging purposes.
Logs event info, for debugging purposes.
(use-db db)
Adds storage to the context as ::db
Adds storage to the context as ::db
Combines load-build
and save-build
interceptors. Note that this does not work
atomically.
Combines `load-build` and `save-build` interceptors. Note that this does not work atomically.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close