Lots of fixes for cloud.
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
(:require
|
||||
[auto-ap.datomic :refer [audit-transact conn]]
|
||||
[auto-ap.datomic.accounts :as d-accounts]
|
||||
[iol-ion.tx :refer [upsert-entity]]
|
||||
[auto-ap.graphql.utils
|
||||
:refer [->graphql
|
||||
<-graphql
|
||||
@@ -15,6 +14,7 @@
|
||||
[auto-ap.search :as search]
|
||||
[auto-ap.utils :refer [heartbeat]]
|
||||
[datomic.client.api :as dc]
|
||||
[iol-ion.tx :refer [random-tempid upsert-entity]]
|
||||
[mount.core :as mount]
|
||||
[yang.scheduler :as scheduler]))
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
:account/code (str numeric-code)
|
||||
:account/client-overrides (mapv
|
||||
(fn [client-override]
|
||||
{:db/id (:id client-override)
|
||||
{:db/id (or (:id client-override) (random-tempid))
|
||||
:account-client-override/client (:client-id client-override)
|
||||
:account-client-override/name (:name client-override)
|
||||
:account-client-override/search-terms (:name client-override)})
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
(ns auto-ap.graphql.ezcater
|
||||
(:require
|
||||
[auto-ap.datomic :refer [conn]]
|
||||
[auto-ap.graphql.utils :refer [assert-admin cleanse-query]]
|
||||
[auto-ap.graphql.utils
|
||||
:refer [assert-admin attach-tracing-resolvers cleanse-query]]
|
||||
[auto-ap.search :as search]
|
||||
[com.walmartlabs.lacinia.util :refer [attach-resolvers]]
|
||||
[auto-ap.utils :refer [heartbeat]]
|
||||
[datomic.client.api :as dc]
|
||||
[auto-ap.graphql.utils :refer [attach-tracing-resolvers]]))
|
||||
[mount.core :as mount]
|
||||
[yang.scheduler :as scheduler]))
|
||||
|
||||
(defn search [context args _]
|
||||
(assert-admin (:id context))
|
||||
@@ -26,6 +28,10 @@
|
||||
:text (:ezcater-caterer/search-terms result)})
|
||||
"ezcater-caterer"))
|
||||
|
||||
(mount/defstate indexer
|
||||
:start (scheduler/every (* 5 60 1000) (heartbeat rebuild-search-index "rebuild-search-index"))
|
||||
:stop (scheduler/stop indexer))
|
||||
|
||||
(def objects
|
||||
{:ezcater_caterer {:fields {:name {:type 'String}
|
||||
:id {:type :id}}}})
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
rule-id (if id
|
||||
id
|
||||
"transaction-rule")
|
||||
transaction [`(upsert-entity ~#:transaction-rule {:db/id rule-id
|
||||
transaction [`(upsert-entity ~#:transaction-rule {:db/id (or rule-id (random-tempid))
|
||||
:description description
|
||||
:note note
|
||||
:client client_id
|
||||
|
||||
Reference in New Issue
Block a user