diff options
| author | ire <refsdal.ivar@gmail.com> | 2025-05-21 13:48:10 +0200 |
|---|---|---|
| committer | ire <refsdal.ivar@gmail.com> | 2025-05-21 13:48:10 +0200 |
| commit | 4a3a9a5da6e7a8771eb3adb79172aca5ce8f26a6 (patch) | |
| tree | 8838d1682d0c447cd6dcea7833107789f7ae25b3 | |
| parent | Doc. Return true/false if queues were stopped or not #7 (diff) | |
| download | fiinha-4a3a9a5da6e7a8771eb3adb79172aca5ce8f26a6.tar.gz fiinha-4a3a9a5da6e7a8771eb3adb79172aca5ce8f26a6.tar.xz | |
Misc #7
| -rw-r--r-- | README.md | 4 | ||||
| -rw-r--r-- | src/com/github/ivarref/yoltq.clj | 4 | ||||
| -rw-r--r-- | src/com/github/ivarref/yoltq/report_queue.clj | 2 |
3 files changed, 5 insertions, 5 deletions
@@ -473,12 +473,12 @@ Added multicast support for `datomic.api/tx-report-queue`: @(d/transact conn [{:db/doc "new-data"}]) ; Stop the queue: -(yq/stop-multicaster-id! conn :q-id-3) +(yq/stop-multicast-consumer-id! conn :q-id-3) => true ; The multicaster thread will send `:end` and the consumer thread will then print "Time to exit. Goodbye!". ; if the queue is already stopped (or never was started), `stop-multicaster...` functions will return false: -(yq/stop-multicaster-id! conn :already-stopped-queue-or-typo) +(yq/stop-multicast-consumer-id! conn :already-stopped-queue-or-typo) => false ; Stop all queues for all connections: diff --git a/src/com/github/ivarref/yoltq.clj b/src/com/github/ivarref/yoltq.clj index 298b9d5..45f2051 100644 --- a/src/com/github/ivarref/yoltq.clj +++ b/src/com/github/ivarref/yoltq.clj @@ -402,7 +402,7 @@ (assert (boolean? send-end-token?)) (rq/get-tx-report-queue-multicast! conn id send-end-token?))) -(defn stop-multicaster-id! +(defn stop-multicast-consumer-id! "Stop forwarding reports from datomic.api/tx-report-queue to the queue identified by `conn` and `id`. If this is the last report destination for the given `conn`, the multicaster thread will exit. Repeated calls are no-op. @@ -414,7 +414,7 @@ Return `false` if the queue does not exist." [conn id] (assert (instance? Connection conn)) - (rq/stop-multicaster-id! conn id)) + (rq/stop-multicast-consumer-id! conn id)) (defn stop-multicaster! "Stop forwarding reports from datomic.api/tx-report-queue to any queues belonging to `conn`. diff --git a/src/com/github/ivarref/yoltq/report_queue.clj b/src/com/github/ivarref/yoltq/report_queue.clj index c3fd383..b3685b9 100644 --- a/src/com/github/ivarref/yoltq/report_queue.clj +++ b/src/com/github/ivarref/yoltq/report_queue.clj @@ -334,7 +334,7 @@ (not= (all-queues old) (all-queues new))) -(defn stop-multicaster-id! [conn id] +(defn stop-multicast-consumer-id! [conn id] (assert (instance? Connection conn)) (let [did-remove? (atom nil)] (locking consumer-state-lock |
