switches to 90 days

This commit is contained in:
2023-04-05 21:19:50 -07:00
parent 500eb5641e
commit bb8ca82328
3 changed files with 30 additions and 6 deletions

View File

@@ -20,7 +20,7 @@
(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")))
(defn excel-date [d]

View File

@@ -2,7 +2,8 @@
(ns link-sales-queries
(:require [datomic.client.api :as dc]
[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 #{}
[
@@ -295,9 +296,7 @@
]
))
(user/init-repl)
config.core/env
(def unattached-queries
@@ -375,6 +374,8 @@
(auto-ap.datomic/audit-transact unattached-queries-categorized
{:user/name "Attaching-used-queries"})
)

View File

@@ -68,7 +68,30 @@ Merge branch into master
Rename prod-cloud to prod everywhere
Release again
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})
)