0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-03 21:09:00 -05:00

📎 Minor changes on internal audit archive task params.

This commit is contained in:
Andrey Antukh 2021-09-29 09:01:36 +02:00
parent 8a162e39d5
commit 045a5156d1

View file

@ -229,7 +229,7 @@
"select * from audit_log "select * from audit_log
where archived_at is null where archived_at is null
order by created_at asc order by created_at asc
limit 100 limit 1000
for update skip locked;") for update skip locked;")
(defn archive-events (defn archive-events
@ -287,13 +287,11 @@
xform (comp (map decode-row) xform (comp (map decode-row)
(map row->event)) (map row->event))
events (into [] xform rows)] events (into [] xform rows)]
(l/debug :action "archive-events" :uri uri :events (count events)) (when-not (empty? events)
(if (empty? events) (l/debug :action "archive-events" :uri uri :events (count events))
:empty (send events)
(do (mark-as-archived conn rows)
(send events) :continue)))))
(mark-as-archived conn rows)
:continue))))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; GC Task ;; GC Task