summaryrefslogtreecommitdiff
path: root/internal/processing/instance.go
diff options
context:
space:
mode:
authorLibravatar kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>2023-03-03 23:02:23 +0000
committerLibravatar GitHub <noreply@github.com>2023-03-03 23:02:23 +0000
commita8e6bdfa33f3232ebc8f241b9c90e4da9191a627 (patch)
tree087eca372fb13093f39837683682ca9e11b96188 /internal/processing/instance.go
parent[bugfix] Federate status delete using just the URI (#1584) (diff)
downloadgotosocial-a8e6bdfa33f3232ebc8f241b9c90e4da9191a627.tar.xz
[performance] cache media attachments (#1525)
* replace concurrency worker pools with base models in State.Workers, update code and tests accordingly * add media attachment caching, slightly tweak default cache config * further tweak default cache config values * replace other media attachment db calls to go through cache * update envparsing test * fix delete media attachment sql * fix media sql query * invalidate cached media entries during status create / update * fix envparsing test * fix typo in panic log message... * add 'updated_at' column during UpdateAttachment * remove unused func --------- Signed-off-by: kim <grufwub@gmail.com>
Diffstat (limited to 'internal/processing/instance.go')
-rw-r--r--internal/processing/instance.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/processing/instance.go b/internal/processing/instance.go
index 3ca807af3..944b62a91 100644
--- a/internal/processing/instance.go
+++ b/internal/processing/instance.go
@@ -233,7 +233,7 @@ func (p *Processor) InstancePatch(ctx context.Context, form *apimodel.InstanceSe
} else if form.AvatarDescription != nil && ia.AvatarMediaAttachment != nil {
// process just the description for the existing avatar
ia.AvatarMediaAttachment.Description = *form.AvatarDescription
- if err := p.state.DB.UpdateByID(ctx, ia.AvatarMediaAttachment, ia.AvatarMediaAttachmentID, "description"); err != nil {
+ if err := p.state.DB.UpdateAttachment(ctx, ia.AvatarMediaAttachment, "description"); err != nil {
return nil, gtserror.NewErrorInternalError(fmt.Errorf("db error updating instance avatar description: %s", err))
}
}