mirror of
https://github.com/penpot/penpot.git
synced 2025-06-11 01:11:38 +02:00
♻️ Minor task naming and directory structure refactor.
This commit is contained in:
parent
4849904b0b
commit
f84d0f34e6
5 changed files with 93 additions and 80 deletions
|
@ -15,6 +15,7 @@
|
|||
[app.common.pages.migrations :as pmg]
|
||||
[app.config :as cfg]
|
||||
[app.db :as db]
|
||||
[app.metrics :as mtx]
|
||||
[app.tasks :as tasks]
|
||||
[app.util.blob :as blob]
|
||||
[app.util.time :as dt]
|
||||
|
@ -94,10 +95,16 @@
|
|||
|
||||
(defn handler
|
||||
[_task]
|
||||
(log/debug "running 'file-media-gc' task.")
|
||||
(db/with-atomic [conn db/pool]
|
||||
(loop []
|
||||
(let [files (retrieve-candidates conn)]
|
||||
(when (seq files)
|
||||
(run! (partial process-file conn) files)
|
||||
(recur))))))
|
||||
|
||||
|
||||
(mtx/instrument-with-summary!
|
||||
{:var #'handler
|
||||
:id "tasks__file_media_gc"
|
||||
:help "Timing of task: file_media_gc"})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue