Lots of fixes for cloud.
This commit is contained in:
@@ -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}}}})
|
||||
|
||||
Reference in New Issue
Block a user