switches to 90 days
This commit is contained in:
@@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
|
|
||||||
(defn recent-date []
|
(defn recent-date []
|
||||||
(coerce/to-date (time/minus (local-now) (time/days 10))))
|
(coerce/to-date (time/minus (local-now) (time/days 90))))
|
||||||
|
|
||||||
(def excel-formatter (f/with-zone (f/formatter "MM/dd/yyyy") (time/time-zone-for-id "America/Los_Angeles")))
|
(def excel-formatter (f/with-zone (f/formatter "MM/dd/yyyy") (time/time-zone-for-id "America/Los_Angeles")))
|
||||||
(defn excel-date [d]
|
(defn excel-date [d]
|
||||||
|
|||||||
@@ -2,7 +2,8 @@
|
|||||||
(ns link-sales-queries
|
(ns link-sales-queries
|
||||||
(:require [datomic.client.api :as dc]
|
(:require [datomic.client.api :as dc]
|
||||||
[auto-ap.datomic :refer [conn]]
|
[auto-ap.datomic :refer [conn]]
|
||||||
[auto-ap.routes.queries :refer [get-query]]))
|
[auto-ap.routes.queries :refer [get-query]]
|
||||||
|
[auto-ap.config :as config]))
|
||||||
|
|
||||||
(def recently-used-query-ids (into #{}
|
(def recently-used-query-ids (into #{}
|
||||||
[
|
[
|
||||||
@@ -295,9 +296,7 @@
|
|||||||
|
|
||||||
]
|
]
|
||||||
))
|
))
|
||||||
|
config.core/env
|
||||||
|
|
||||||
(user/init-repl)
|
|
||||||
|
|
||||||
|
|
||||||
(def unattached-queries
|
(def unattached-queries
|
||||||
@@ -375,6 +374,8 @@
|
|||||||
(auto-ap.datomic/audit-transact unattached-queries-categorized
|
(auto-ap.datomic/audit-transact unattached-queries-categorized
|
||||||
{:user/name "Attaching-used-queries"})
|
{:user/name "Attaching-used-queries"})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -68,7 +68,30 @@ Merge branch into master
|
|||||||
Rename prod-cloud to prod everywhere
|
Rename prod-cloud to prod everywhere
|
||||||
Release again
|
Release again
|
||||||
git push deploy master
|
git push deploy master
|
||||||
regenerate all sales queries
|
regenerate all sales queries (clients.clj)
|
||||||
|
|
||||||
|
;; update the index
|
||||||
|
(doseq [[c] (dc/q '[:find ?c :where [?c :client/code]] (dc/db conn))
|
||||||
|
:let [_ (println "client " c)]
|
||||||
|
batch (->> (dc/q '[:find ?so ?d ?c
|
||||||
|
:in $ ?c
|
||||||
|
:where
|
||||||
|
[?so :sales-order/client ?c]
|
||||||
|
[?so :sales-order/date ?d]]
|
||||||
|
(dc/db conn)
|
||||||
|
c)
|
||||||
|
(map (fn [[so d c]]
|
||||||
|
{:db/id so
|
||||||
|
:sales-order/date d
|
||||||
|
:sales-order/client c}))
|
||||||
|
(partition-all 1000))]
|
||||||
|
|
||||||
|
(println (count batch))
|
||||||
|
(print ".")
|
||||||
|
(flush)
|
||||||
|
(dc/transact conn {:tx-data batch})
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user