From 63497b893077dddb8db40443104a2e4e7008fea7 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Thu, 13 Nov 2025 15:03:03 +0100 Subject: [PATCH] :sparkles: Add tempfile bucket to the storage subsystem This enables storing temporal files under storage subsystem. The temporal objects (the objects that uses templfile bucket) will always evaluate to "for deletion" after touched garbage collection; and the deletion threshold will be 2 hours (the threshold is always calculated from the instant when the touched garbage collector is running). --- backend/src/app/storage.clj | 1 + backend/src/app/storage/gc_touched.clj | 1 + 2 files changed, 2 insertions(+) diff --git a/backend/src/app/storage.clj b/backend/src/app/storage.clj index c554955fcd..0d7bac7eca 100644 --- a/backend/src/app/storage.clj +++ b/backend/src/app/storage.clj @@ -41,6 +41,7 @@ "file-object-thumbnail" "file-thumbnail" "profile" + "tempfile" "file-data" "file-data-fragment" "file-change"}) diff --git a/backend/src/app/storage/gc_touched.clj b/backend/src/app/storage/gc_touched.clj index a906626647..964765589b 100644 --- a/backend/src/app/storage/gc_touched.clj +++ b/backend/src/app/storage/gc_touched.clj @@ -165,6 +165,7 @@ "file-thumbnail" (process-objects! conn has-file-thumbnails-refs? bucket objects) "profile" (process-objects! conn has-profile-refs? bucket objects) "file-data" (process-objects! conn has-file-data-refs? bucket objects) + "tempfile" (process-objects! conn (constantly false) bucket objects) (ex/raise :type :internal :code :unexpected-unknown-reference :hint (dm/fmt "unknown reference '%'" bucket))))