fixed warnings.

This commit is contained in:
2022-07-26 05:56:41 -07:00
parent f6f73a6110
commit 96c80853ef
133 changed files with 670 additions and 1640 deletions

View File

@@ -1,21 +1,23 @@
(ns auto-ap.square.core
(:require [auto-ap.datomic :refer [conn remove-nils]]
[auto-ap.utils :refer [heartbeat]]
[auto-ap.time :as atime]
[clj-http.client :as client]
[clj-time.coerce :as coerce]
[clj-time.core :as time]
[clj-time.periodic :as periodic]
[clj-time.format :as f]
[clojure.string :as str]
[clojure.data.json :as json]
[clojure.tools.logging :as log]
[datomic.api :as d]
[mount.core :as mount]
[unilog.context :as lc]
[yang.scheduler :as scheduler]
[clojure.core.async :as async]
[slingshot.slingshot :refer [try+]]))
(:require
[auto-ap.datomic :refer [conn remove-nils]]
[auto-ap.time :as atime]
[auto-ap.utils :refer [heartbeat]]
[clj-http.client :as client]
[clj-time.coerce :as coerce]
[clj-time.core :as time]
[clj-time.format :as f]
[clj-time.periodic :as periodic]
[clojure.core.async :as async]
[clojure.data.json :as json]
[clojure.set :as set]
[clojure.string :as str]
[clojure.tools.logging :as log]
[datomic.api :as d]
[mount.core :as mount]
[slingshot.slingshot :refer [try+]]
[unilog.context :as lc]
[yang.scheduler :as scheduler]))
(defn client-base-headers [client]
{"Square-Version" "2021-08-18"
@@ -225,7 +227,7 @@
(and (or (> (count (:tenders order)) 0)
(seq (:returns order)))
(or (= #{} (set (map #(:status (:card_details %)) (:tenders order))))
(not= #{} (clojure.set/difference
(not= #{} (set/difference
(set (map #(:status (:card_details %)) (:tenders order)))
#{"FAILED" "VOIDED"}))))))
(filter (fn [order]
@@ -519,7 +521,7 @@
(mark-integration-status client {:integration-status/state :integration-state/failed
:integration-status/message (-> data :body str)}))
(catch Object e
(catch Object _
(log/warn &throw-context)
(mark-integration-status client {:integration-status/state :integration-state/failed
:integration-status/message (or (some-> (:wrapper &throw-context) (.getMessage ))