Skip to content

Commit

Permalink
chore: bump to v0.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
J0sueTM committed Jul 9, 2024
1 parent e4df790 commit e8871a7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
19 changes: 15 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ RQ (Redis Queue) is a simple Clojure package for queueing jobs and processing th
We distribute the library via [Clojars](https://clojars.org/com.moclojer/rq).

```edn
com.moclojer/rq {:mvn/version "0.1.2"}
com.moclojer/rq {:mvn/version "0.1.3"}
```

```clojure
[com.moclojer/rq "0.1.2"]
[com.moclojer/rq "0.1.3"]
```

## example
Expand All @@ -33,8 +33,19 @@ com.moclojer/rq {:mvn/version "0.1.2"}
(prn :popped (queue/pop! *redis-pool* "my-queue"))

;; pub/sub
(pubsub/subscribe! *redis-pool* #(prn :chan %1 :msg %2) ["name-subs"])
(pubsub/publish! *redis-pool* "name-subs" {:hello true)})
(def my-workers
[{:channel "my-channel"
:handler (fn [msg]
(prn :msg :my-channel msg))}
{:channel "my-other-channel"
:handler (fn [{:keys [my data hello]}]
(my-function my data hello))}])

(pubsub/subscribe! *redis-pool* my-workers)
(pubsub/publish! *redis-pool* "my-channel" "hello world")
(pubsub/publish! *redis-pool* "my-other-channel" {:my "moclojer team"
:data "app.moclojer.com"
:hello "maybe you'll like this website"})

(rq/close-client *redis-pool*)
```
Expand Down
2 changes: 1 addition & 1 deletion src/com/moclojer/rq.clj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
(:import
[redis.clients.jedis JedisPooled]))

(def version "0.1.2")
(def version "0.1.3")

;; redis connection pool to be thread safe
(def
Expand Down

0 comments on commit e8871a7

Please sign in to comment.