diff --git a/backend/src/app/main.clj b/backend/src/app/main.clj index af6c77a45..f0b9f6cc5 100644 --- a/backend/src/app/main.clj +++ b/backend/src/app/main.clj @@ -230,30 +230,21 @@ :app.tasks.tasks-gc/handler {:pool (ig/ref :app.db/pool) - :max-age cf/deletion-delay - :metrics (ig/ref :app.metrics/metrics)} + :max-age cf/deletion-delay} :app.tasks.delete-object/handler {:pool (ig/ref :app.db/pool) - :metrics (ig/ref :app.metrics/metrics)} - - :app.tasks.delete-storage-object/handler - {:pool (ig/ref :app.db/pool) - :storage (ig/ref :app.storage/storage) - :metrics (ig/ref :app.metrics/metrics)} + :storage (ig/ref :app.storage/storage)} :app.tasks.delete-profile/handler - {:pool (ig/ref :app.db/pool) - :metrics (ig/ref :app.metrics/metrics)} + {:pool (ig/ref :app.db/pool)} :app.tasks.file-media-gc/handler {:pool (ig/ref :app.db/pool) - :metrics (ig/ref :app.metrics/metrics) :max-age cf/deletion-delay} :app.tasks.file-xlog-gc/handler {:pool (ig/ref :app.db/pool) - :metrics (ig/ref :app.metrics/metrics) :max-age (dt/duration {:hours 48})} :app.tasks.telemetry/handler diff --git a/backend/src/app/tasks/delete_object.clj b/backend/src/app/tasks/delete_object.clj index 8a8335bcd..d2d9420e8 100644 --- a/backend/src/app/tasks/delete_object.clj +++ b/backend/src/app/tasks/delete_object.clj @@ -18,7 +18,7 @@ (declare handle-deletion) (defmethod ig/pre-init-spec ::handler [_] - (s/keys :req-un [::db/pool])) + (s/keys :req-un [::db/pool ::sto/storage])) (defmethod ig/init-key ::handler [_ {:keys [pool] :as cfg}] diff --git a/backend/src/app/tasks/file_xlog_gc.clj b/backend/src/app/tasks/file_xlog_gc.clj index 36fb71cf3..f526e3279 100644 --- a/backend/src/app/tasks/file_xlog_gc.clj +++ b/backend/src/app/tasks/file_xlog_gc.clj @@ -23,12 +23,12 @@ (defmethod ig/init-key ::handler [_ {:keys [pool max-age] :as cfg}] - (fn [_] + (fn [task] (db/with-atomic [conn pool] (let [interval (db/interval max-age) result (db/exec-one! conn [sql:delete-files-xlog interval]) result (:next.jdbc/update-count result)] - (l/debug :action "trim file-change table" :removed result) + (l/debug :removed result :hint "remove old file changes") result)))) (def ^:private diff --git a/backend/src/app/worker.clj b/backend/src/app/worker.clj index e33a11464..1e3e2dea9 100644 --- a/backend/src/app/worker.clj +++ b/backend/src/app/worker.clj @@ -98,11 +98,11 @@ ;; Terminate the loop if close channel is closed or ;; event-loop-fn returns nil. (or (= port close-ch) (nil? val)) - (l/debug :msg "stop condition found") + (l/debug :hint "stop condition found") (db/pool-closed? pool) (do - (l/debug :msg "eventloop aborted because pool is closed") + (l/debug :hint "eventloop aborted because pool is closed") (a/close! close-ch)) (and (instance? java.sql.SQLException val) @@ -115,7 +115,7 @@ (and (instance? java.sql.SQLException val) (= "40001" (.getSQLState ^java.sql.SQLException val))) (do - (l/debug :msg "serialization failure (retrying in some instants)") + (l/debug :hint "serialization failure (retrying in some instants)") (a/