Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/boxuk/wrap-worker

Worker Ring Middleware
https://github.com/boxuk/wrap-worker

Last synced: 5 days ago
JSON representation

Worker Ring Middleware

Awesome Lists containing this project

README

        

# Worker Ring Middleware

Ring middleware which uses [Worker](https://github.com/boxuk/worker) to handle identical simultaneous requests.

## Installation

Available from [Clojars](https://clojars.org/boxuk/wrap-worker).

## Usage

```clojure
(ns my.project
(:use [wrap-worker :only [wrap-worker]])
(:require (compojure [handler :as handler])))

(-> #'app-routes
(wrap-worker)
(handler/site))
```

## How It Works

The middleware will (for GET requests only) check the URI and any parameters,
and use these to pass to [Worker](https://github.com/boxuk/worker) to handle identical requests with the same
process.