fix: close library upload flow and harden image storage
This commit is contained in:
@@ -64,14 +64,7 @@ class UploadRetries:
|
||||
)
|
||||
# Only disposable generated staging files are owned by this recovery.
|
||||
if row and row["kind"] == "cache" and not (meta and meta["starred"]):
|
||||
self.service.assets.path(asset_id).unlink(missing_ok=True)
|
||||
with self.db.transaction() as tx:
|
||||
for table, field in (
|
||||
("assets", "id"),
|
||||
("asset_sources", "asset_id"),
|
||||
("asset_metadata", "asset_id"),
|
||||
):
|
||||
tx.execute(f"DELETE FROM {table} WHERE {field}=?", (asset_id,))
|
||||
self.service.libraries.remove_asset(asset_id)
|
||||
|
||||
def tick(self, current):
|
||||
for job in self.db.all("SELECT * FROM jobs WHERE enabled=1"):
|
||||
|
||||
Reference in New Issue
Block a user