Increase default deletion delay.

This commit is contained in:
Andrey Antukh 2021-02-10 16:48:13 +01:00 committed by Alonso Torres
parent d6f3efb358
commit 2e438385f3
8 changed files with 29 additions and 25 deletions

View file

@ -42,11 +42,12 @@
(db/with-atomic [conn pool]
(handle-deletion conn props)))
(defmulti handle-deletion (fn [_ props] (:type props)))
(defmulti handle-deletion
(fn [_ props] (:type props)))
(defmethod handle-deletion :default
[_conn {:keys [type]}]
(log/warn "no handler found for" type))
(log/warnf "no handler found for %s" type))
(defmethod handle-deletion :file
[conn {:keys [id] :as props}]
@ -57,3 +58,8 @@
[conn {:keys [id] :as props}]
(let [sql "delete from project where id=? and deleted_at is not null"]
(db/exec-one! conn [sql id])))
(defmethod handle-deletion :team
[conn {:keys [id] :as props}]
(let [sql "delete from team where id=? and deleted_at is not null"]
(db/exec-one! conn [sql id])))