mirror of
https://github.com/civitai/civitai.git
synced 2026-09-20 22:08:18 +08:00
3726a28811
Four imports were stuck on "The specified bucket does not exist". They were started from a machine without B2 configured, so their uploads opened in the default backend's bucket; when a production pod resumed them it sent that bucket name to B2. A resume, abort, delete or pre-attach existence check now uses the client for the bucket stored on the row, not the backend configured now. A stuck import had no way out: Restart resumed the upload that could not be aborted, and Delete refused. Restart now always begins from nothing, in the backend configured now. Both try to free what the row stored first; an upload or file that is already gone counts as freed, and a bucket one backend does not know is tried on the other. If removal still fails, the page shows the storage error and offers "Restart anyway" / "Delete anyway", which logs where the leftover is. Deleting bytes a model file still points at stays refused. The job's give-up path now reads the richer abort result correctly and logs a failed abort, and the queue list sorts a batch by file size then id, so rows that share a createdAt stop reshuffling on every poll. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015cyrXpr87t9Tj3bnzRrUhp