From f304a544fd3c56419d01e23bbf48d594779847fe Mon Sep 17 00:00:00 2001 From: Bryce Covert Date: Fri, 8 Jul 2022 15:50:15 -0700 Subject: [PATCH] minor cleanup. no errors anymore. --- .clj-kondo/config.edn | 3 ++- .clj-kondo/hooks/defstate.clj | 2 +- src/clj/user.clj | 10 ++++++---- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.clj-kondo/config.edn b/.clj-kondo/config.edn index 5495176e..eaa30934 100644 --- a/.clj-kondo/config.edn +++ b/.clj-kondo/config.edn @@ -1,6 +1,7 @@ {:linters {:clojure-lsp/unused-public-var {:exclude-when-defined-by #{mount.core/defstate}} :clojure-lsp/unresolved-var {:exclude [(amazonica.aws.s3 amazonica.aws.sqs)]} - :unresolved-var {:exclude [amazonica.aws.s3]} + :unresolved-var {:exclude [amazonica.aws.s3 amazonica.aws.sqs]} + :unused-public-var {:exclude-when-defined-by #{mount.core/defstate}} :private-call {:level :off} :mount/defstate {:level :warning}} diff --git a/.clj-kondo/hooks/defstate.clj b/.clj-kondo/hooks/defstate.clj index b047d38e..4047f4b3 100644 --- a/.clj-kondo/hooks/defstate.clj +++ b/.clj-kondo/hooks/defstate.clj @@ -41,6 +41,6 @@ (api/token-node 'do) (list* - (api/token-node 'fn*) + (api/token-node 'fn) (api/vector-node []) args)))))}))) diff --git a/src/clj/user.clj b/src/clj/user.clj index 820439cf..c8aab0eb 100644 --- a/src/clj/user.clj +++ b/src/clj/user.clj @@ -12,6 +12,7 @@ [clojure.data.csv :as csv] [clj-time.coerce :as c] [clj-time.core :as t] + [clj-time.periodic :as per] [clojure.java.io :as io] [clojure.string :as str] @@ -485,11 +486,11 @@ (println "orders") (lc/with-context {:source "Historical loading data"} - (doseq [d (clj-time.periodic/periodic-seq (t/plus (t/today) (t/days (- days))) + (doseq [d (per/periodic-seq (t/plus (t/today) (t/days (- days))) (t/today) (t/days 1))] (println d) - (square/upsert client square-location d))) + (square/upsert client square-location d (t/plus d t/days 1)))) (println "refunds") (square/upsert-refunds client square-location) @@ -497,7 +498,7 @@ (println "settlements") (with-redefs [square/lookup-dates (fn lookup-dates [] - (->> (clj-time.periodic/periodic-seq (t/plus (t/today) (t/days (- days))) + (->> (per/periodic-seq (t/plus (t/today) (t/days (- days))) (t/today) (t/days 2)) (map (fn [d] @@ -517,7 +518,8 @@ (println "orders") (lc/with-context {:source "Historical loading data"} - (square/upsert client square-location (c/to-date-time date))))) + (square/upsert client square-location (c/to-date-time date) + (t/plus (c/to-date-time date) (t/days 1)))))) (defn upsert-invoice-amounts [tsv] (let [data (with-open [reader (io/reader (char-array tsv))]