fix(downloads): a suspended user's queued jobs wait, and a clip too big for the space left says so

A suspension now blocks the user's downloads as quota.resolve already advised: the worker leaves
their queued jobs unclaimed until it is lifted (the confirm says so). A cut clip larger than the
remaining storage is refused with its own message (not "storage is full"), and a clip's quota
refusal reads as a clip's in both languages. The cancel poll compares to JobStatus.RUNNING.
This commit is contained in:
2026-10-10 20:28:52 +02:00
parent 4d4eea2c54
commit a867145bcb
14 changed files with 73 additions and 11 deletions
+2 -1
View File
@@ -696,9 +696,10 @@ def test_a_clip_larger_than_what_its_owner_has_left_is_refused_and_not_placed(
job = _clip(as_user(make_user()), source=source, ref=ref).json()
monkeypatch.setattr(quota, "remaining_bytes", lambda _db, _uid: 3) # the cut is 4 bytes
job, asset = worker["run"](job)
# Not "full": there is room left, just not this much.
assert (job.status, job.error, asset.status, asset.rel_path) == (
"error",
dlerrors.QUOTA_FULL_MESSAGE,
dlerrors.CLIP_TOO_BIG_MESSAGE,
"pending",
None,
)