cmp.worker.gen-db-doc

gen-db-doc!

(gen-db-doc! {state-key :StateKey, doc :Value, mp-id :MpName, :as task})

Generates a couchdb document from the value.

(t-assemble "SE3_state-gen_state_doc")
;; {:Action "genDbDoc",
;; :Comment "generates a state doc for storing results",
;; :TaskName "SE3_state-gen_state_doc",
;; :Value
;; {:_id "state-se3_20200923",
;; :State
;; {:Measurement
;;  {:Date [{:Type "generated", :Value "2020-09-23 10:37:28"}],
;;   :AuxValues {},
;;   :Values {}}}},
;; :MpName "core",
;; :StateKey "core@test@0@state@0@0"}

gen-req

(gen-req doc)

Assoc a json version of the doc (with updated revision) as :body

gen-url

(gen-url id)