Migrates back to datomic on-prem
This commit is contained in:
@@ -10,8 +10,8 @@
|
||||
[clojure.tools.logging :as log]
|
||||
[com.unbounce.dogstatsd.core :as statsd]
|
||||
[config.core :refer [env]]
|
||||
[datomic.client.api :as dc]
|
||||
[iol-ion.tx :refer [random-tempid upsert-entity]]
|
||||
[datomic.api :as dc]
|
||||
[iol-ion.tx :refer [random-tempid]]
|
||||
[ring.middleware.json :refer [wrap-json-response]]
|
||||
[ring.util.request :refer [body-string]]
|
||||
[unilog.context :as lc])
|
||||
@@ -45,12 +45,12 @@
|
||||
(or (pull-attr (dc/db conn) :saved-query/guid [:saved-query/lookup-key lookup-key])
|
||||
guid)
|
||||
guid)]
|
||||
(dc/transact conn {:tx-data [`(upsert-entity ~{:db/id (or id (random-tempid))
|
||||
:saved-query/guid guid
|
||||
:saved-query/description note
|
||||
:saved-query/key (str "queries/" guid)
|
||||
:saved-query/client client
|
||||
:saved-query/lookup-key lookup-key})]})
|
||||
@(dc/transact conn [[:upsert-entity {:db/id (or id (random-tempid))
|
||||
:saved-query/guid guid
|
||||
:saved-query/description note
|
||||
:saved-query/key (str "queries/" guid)
|
||||
:saved-query/client client
|
||||
:saved-query/lookup-key lookup-key}]])
|
||||
(s3/put-object :bucket-name (:data-bucket env)
|
||||
:key (str "queries/" guid)
|
||||
:input-stream (io/make-input-stream (.getBytes body) {})
|
||||
|
||||
Reference in New Issue
Block a user