mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-25 11:38:47 +00:00
refactor(asset): optimize cleanup job and solidify GC with locking
This commit is contained in:
@@ -42,6 +42,10 @@ enum AssetStatus {
|
||||
processed
|
||||
trashed
|
||||
pending_purge
|
||||
}
|
||||
|
||||
enum StorageKeyStatus {
|
||||
active
|
||||
purging
|
||||
}
|
||||
|
||||
@@ -406,10 +410,11 @@ model Asset {
|
||||
}
|
||||
|
||||
model StorageKey {
|
||||
id String @id @default(ulid())
|
||||
key String @unique
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
updatedAt DateTime @updatedAt @map("updated_at")
|
||||
id String @id @default(ulid())
|
||||
key String @unique
|
||||
status StorageKeyStatus @default(active)
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
updatedAt DateTime @updatedAt @map("updated_at")
|
||||
assets Asset[]
|
||||
|
||||
@@map("storage_keys")
|
||||
|
||||
Reference in New Issue
Block a user