Make initial views compute queries in parallel.
This commit is contained in:
parent
970cb80670
commit
b1550b1fc1
|
@ -1,4 +1,4 @@
|
||||||
(defproject views "0.3.0"
|
(defproject views "0.4.0"
|
||||||
:description "You underestimate the power of the SQL side"
|
:description "You underestimate the power of the SQL side"
|
||||||
|
|
||||||
:url "https://github.com/diligenceengine/views"
|
:url "https://github.com/diligenceengine/views"
|
||||||
|
|
|
@ -58,8 +58,8 @@
|
||||||
view-sigs (view-filter msg (view-sig-fn* view-sig-fn msg) templates {:unsafe? unsafe?})] ; this is where security comes in.
|
view-sigs (view-filter msg (view-sig-fn* view-sig-fn msg) templates {:unsafe? unsafe?})] ; this is where security comes in.
|
||||||
(debug "Subscribing views: " view-sigs " for subscriber " subscriber-key ", in namespace " namespace)
|
(debug "Subscribing views: " view-sigs " for subscriber " subscriber-key ", in namespace " namespace)
|
||||||
(when (seq view-sigs)
|
(when (seq view-sigs)
|
||||||
(thread
|
|
||||||
(doseq [vs view-sigs]
|
(doseq [vs view-sigs]
|
||||||
|
(thread
|
||||||
(let [iv (subscribe-and-compute db persistence templates vs namespace subscriber-key)]
|
(let [iv (subscribe-and-compute db persistence templates vs namespace subscriber-key)]
|
||||||
(send-fn* send-fn subscriber-key :views.init iv)))))))
|
(send-fn* send-fn subscriber-key :views.init iv)))))))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue