aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorIvar Refsdal <ivar.refsdal@nsd.no>2021-09-23 11:38:17 +0200
committerIvar Refsdal <ivar.refsdal@nsd.no>2021-09-23 11:38:17 +0200
commit3021047637c21378cf6cd9198d9a25423be5c7f3 (patch)
tree10515c76afaa2a290fa9447f86e11820837f7f68 /README.md
parentAdd force-retry! (diff)
downloadfiinha-3021047637c21378cf6cd9198d9a25423be5c7f3.tar.gz
fiinha-3021047637c21378cf6cd9198d9a25423be5c7f3.tar.xz
Document force-retry!
Diffstat (limited to 'README.md')
-rw-r--r--README.md24
1 files changed, 12 insertions, 12 deletions
diff --git a/README.md b/README.md
index 84dc91b..dab1cef 100644
--- a/README.md
+++ b/README.md
@@ -229,16 +229,20 @@ For a regular system and/or REPL session you'll want to do:
; Oops I need another consumer. This works fine:
(yq/add-consumer! :q-three ...)
+
+; When the application is shutting down:
+(yq/stop!)
```
You may invoke `yq/add-consumer!` and `yq/init!` on a live system as you like.
+
If you change `:pool-size` or `:poll-delay` you will have to `(yq/stop!)` and
`(yq/start!)` to make changes take effect.
# Testing
For testing you will probably want determinism over an extra threadpool
-by enabling the virtual queue:
+by using the test queue:
```clojure
...
@@ -259,20 +263,16 @@ by enabling the virtual queue:
; tq/consume! consumes one job and asserts that it succeeds.
; It returns the return value of the consumer function
- (is (= {:work 123} (tq/consume! :q)))))
+ (is (= {:work 123} (tq/consume! :q)))
+
+ ; If you want to test the idempotence of your function,
+ ; you may force retry a consumer function:
+ ; This may for example be useful to verify that the
+ ; :db.cas logic is correct.
+ (is (= {:work 123} (tq/force-retry! :q)))))
```
-## Other features and notes
-
-
-### Logging
-
-
-
-### Total health and system sanity
-
-
### Ordering
There is no attempt at ordering the execution of queue jobs.