Add notion of DELAYED upload processing

This commit is contained in:
Jordan Eldredge 2022-03-10 23:55:06 -05:00
parent 85346ae068
commit 4414c26a39
2 changed files with 10 additions and 0 deletions

View file

@ -112,6 +112,10 @@ class RootResolver extends MutationResolver {
// TODO: Could we avoid fetching the skin if it's not read?
const skinModel = await SkinModel.fromMd5(ctx, skin_md5);
const skin = skinModel == null ? null : new SkinResolver(skinModel);
// Most of the time when a skin fails to process, it's due to some infa
// issue on our side, and we can recover. For now, we'll always tell the user
// That processing is just delayed.
status = status === "ERRORED" ? "DELAYED" : status;
return { id, skin, status, upload_md5: skin_md5 };
})
);

View file

@ -318,6 +318,12 @@ enum SkinUploadStatus {
the skin will be retried at a later time.
"""
ERRORED
"""
An error occured processing the skin, but it was the fault of the server. It
will be processed at a later date.
"""
DELAYED
"""
The skin has been successfully added to the Museum.