mirror of
https://github.com/penpot/penpot.git
synced 2025-01-23 23:18:48 -05:00
📎 Fix linter issues.
This commit is contained in:
parent
8daf6e822e
commit
d889d39151
7 changed files with 9 additions and 21 deletions
|
@ -5,7 +5,7 @@
|
|||
;; This Source Code Form is "Incompatible With Secondary Licenses", as
|
||||
;; defined by the Mozilla Public License, v. 2.0.
|
||||
;;
|
||||
;; Copyright (c) 2020 UXBOX Labs SL
|
||||
;; Copyright (c) UXBOX Labs SL
|
||||
|
||||
(ns app.db
|
||||
(:require
|
||||
|
@ -16,8 +16,8 @@
|
|||
[app.db.sql :as sql]
|
||||
[app.metrics :as mtx]
|
||||
[app.util.json :as json]
|
||||
[app.util.migrations :as mg]
|
||||
[app.util.logging :as l]
|
||||
[app.util.migrations :as mg]
|
||||
[app.util.time :as dt]
|
||||
[app.util.transit :as t]
|
||||
[clojure.java.io :as io]
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
[app.metrics :as mtx]
|
||||
[app.util.logging :as l]
|
||||
[clojure.spec.alpha :as s]
|
||||
[clojure.tools.logging :as log]
|
||||
[integrant.core :as ig]
|
||||
[reitit.ring :as rr]
|
||||
[ring.adapter.jetty9 :as jetty])
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
[app.db.sql :as sql]
|
||||
[app.util.http :as http]
|
||||
[app.util.logging :as l]
|
||||
[clojure.pprint :refer [pprint]]
|
||||
[clojure.spec.alpha :as s]
|
||||
[cuerdas.core :as str]
|
||||
[integrant.core :as ig]
|
||||
|
|
|
@ -178,6 +178,6 @@
|
|||
::l/logger logger
|
||||
:ip-addr ip-addr
|
||||
:profile-id profile-id
|
||||
:uri (str (:uri request) (if qstring (str "?" qstring)))
|
||||
:uri (str (:uri request) (when qstring (str "?" qstring)))
|
||||
:method (name (:request-method request)))
|
||||
(handler request)))))
|
||||
|
|
|
@ -149,9 +149,7 @@
|
|||
:out-ch out-ch
|
||||
:sub-ch sub-ch)]
|
||||
|
||||
(l/log :level :trace
|
||||
:action "connect"
|
||||
:session (:session-id cfg))
|
||||
(l/trace :event "connect" :session (:session-id cfg))
|
||||
|
||||
;; Forward all messages from out-ch to the websocket
|
||||
;; connection
|
||||
|
@ -173,18 +171,14 @@
|
|||
;; close subscription
|
||||
(a/close! sub-ch))))
|
||||
|
||||
(on-error [_conn e]
|
||||
(l/log :level :trace
|
||||
:action "error"
|
||||
:session (:session-id cfg))
|
||||
(on-error [_conn _e]
|
||||
(l/trace :event "error" :session (:session-id cfg))
|
||||
|
||||
(a/close! out-ch)
|
||||
(a/close! rcv-ch))
|
||||
|
||||
(on-close [_conn _status _reason]
|
||||
(l/log :level :trace
|
||||
:action "close"
|
||||
:session (:session-id cfg))
|
||||
(l/trace :event "close" :session (:session-id cfg))
|
||||
|
||||
(a/close! out-ch)
|
||||
(a/close! rcv-ch))
|
||||
|
@ -192,8 +186,7 @@
|
|||
(on-message [_ws message]
|
||||
(let [message (t/decode-str message)]
|
||||
(when-not (a/offer! rcv-ch message)
|
||||
(l/log :level :warn
|
||||
:msg "drop messages"))))]
|
||||
(l/warn :msg "drop messages"))))]
|
||||
|
||||
{:on-connect on-connect
|
||||
:on-error on-error
|
||||
|
|
|
@ -9,10 +9,8 @@
|
|||
|
||||
(ns app.util.logging
|
||||
(:require
|
||||
[linked.core :as lk]
|
||||
[clojure.pprint :refer [pprint]])
|
||||
(:import
|
||||
java.util.Map
|
||||
org.apache.logging.log4j.Level
|
||||
org.apache.logging.log4j.LogManager
|
||||
org.apache.logging.log4j.Logger
|
||||
|
@ -65,7 +63,7 @@
|
|||
^Object msg)))
|
||||
|
||||
(defmacro log
|
||||
[& {:keys [level cause msg ::logger ::async] :as props}]
|
||||
[& {:keys [level cause ::logger ::async] :as props}]
|
||||
(let [props (dissoc props :level :cause ::logger ::async)
|
||||
logger (or logger (str *ns*))
|
||||
logger-sym (gensym "log")
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
[app.util.logging :as l]
|
||||
[clojure.java.io :as io]
|
||||
[clojure.spec.alpha :as s]
|
||||
[cuerdas.core :as str]
|
||||
[next.jdbc :as jdbc]))
|
||||
|
||||
(s/def ::name string?)
|
||||
|
|
Loading…
Add table
Reference in a new issue