Skip to content

Commit e8871a7

Browse files
committed
chore: bump to v0.1.3
1 parent e4df790 commit e8871a7

File tree

2 files changed

+16
-5
lines changed

2 files changed

+16
-5
lines changed

Diff for: README.md

+15-4
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ RQ (Redis Queue) is a simple Clojure package for queueing jobs and processing th
99
We distribute the library via [Clojars](https://clojars.org/com.moclojer/rq).
1010

1111
```edn
12-
com.moclojer/rq {:mvn/version "0.1.2"}
12+
com.moclojer/rq {:mvn/version "0.1.3"}
1313
```
1414

1515
```clojure
16-
[com.moclojer/rq "0.1.2"]
16+
[com.moclojer/rq "0.1.3"]
1717
```
1818

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

3535
;; pub/sub
36-
(pubsub/subscribe! *redis-pool* #(prn :chan %1 :msg %2) ["name-subs"])
37-
(pubsub/publish! *redis-pool* "name-subs" {:hello true)})
36+
(def my-workers
37+
[{:channel "my-channel"
38+
:handler (fn [msg]
39+
(prn :msg :my-channel msg))}
40+
{:channel "my-other-channel"
41+
:handler (fn [{:keys [my data hello]}]
42+
(my-function my data hello))}])
43+
44+
(pubsub/subscribe! *redis-pool* my-workers)
45+
(pubsub/publish! *redis-pool* "my-channel" "hello world")
46+
(pubsub/publish! *redis-pool* "my-other-channel" {:my "moclojer team"
47+
:data "app.moclojer.com"
48+
:hello "maybe you'll like this website"})
3849

3950
(rq/close-client *redis-pool*)
4051
```

Diff for: src/com/moclojer/rq.clj

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
(:import
33
[redis.clients.jedis JedisPooled]))
44

5-
(def version "0.1.2")
5+
(def version "0.1.3")
66

77
;; redis connection pool to be thread safe
88
(def

0 commit comments

Comments
 (0)