diff options
| author | Ivar Refsdal <ivar.refsdal@nsd.no> | 2021-09-27 10:21:51 +0200 |
|---|---|---|
| committer | Ivar Refsdal <ivar.refsdal@nsd.no> | 2021-09-27 10:21:51 +0200 |
| commit | f550e5ac18e4b8f82dcfeca6095b11b91c03e5d6 (patch) | |
| tree | 53bbdbc25695ddee7f9de6593e0ccaae60ed717a /README.md | |
| parent | Simplify (diff) | |
| download | fiinha-f550e5ac18e4b8f82dcfeca6095b11b91c03e5d6.tar.gz fiinha-f550e5ac18e4b8f82dcfeca6095b11b91c03e5d6.tar.xz | |
Document depends-on as a function
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -259,9 +259,16 @@ job to complete before it will be executed: @(d/transact conn [(yq/put :b ; Payload: - {:id "b1"} + {:id "b1" :a-ref "a1"} ; Jobs options: {:depends-on [:a "a1"]})]) + +; depends-on may also be specified as a function of the payload when +; adding the consumer: +(yq/add-consumer! :b + (fn [payload] ...) + {:depends-on (fn [payload] + [:a (:a-ref payload)])}) ``` Here queue job `b1` will not execute before `a1` is `:done`. |
