From 5faeb4de2032e112ab49751eeeb906ac43826f3d Mon Sep 17 00:00:00 2001 From: kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com> Date: Sun, 28 May 2023 13:08:35 +0100 Subject: [chore] tidy up media manager, add calling func to errors, build-script improvements (#1835) * media manager tidy-up: de-interface and remove unused PostDataFunc Signed-off-by: kim * remove last traces of media.Manager being an interface Signed-off-by: kim * update error to provide caller, allow tuneable via build tags Signed-off-by: kim * remove kim-specific build script changes Signed-off-by: kim * fix merge conflicts Signed-off-by: kim * update build-script to support externally setting build variables Signed-off-by: kim --------- Signed-off-by: kim --- internal/processing/media/getfile.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'internal/processing/media/getfile.go') diff --git a/internal/processing/media/getfile.go b/internal/processing/media/getfile.go index 2694fde13..27b08600e 100644 --- a/internal/processing/media/getfile.go +++ b/internal/processing/media/getfile.go @@ -148,8 +148,7 @@ func (p *Processor) getAttachmentContent(ctx context.Context, requestingAccount // [ // the reason it was removed was because a slow // client connection could hold open a storage - // recache operation, and so holding open a media - // worker worker. + // recache operation -> holding open a media worker. // ] dataFn := func(innerCtx context.Context) (io.ReadCloser, int64, error) { @@ -161,7 +160,7 @@ func (p *Processor) getAttachmentContent(ctx context.Context, requestingAccount } // Start recaching this media with the prepared data function. - processingMedia, err := p.mediaManager.PreProcessMediaRecache(ctx, dataFn, nil, wantedMediaID) + processingMedia, err := p.mediaManager.PreProcessMediaRecache(ctx, dataFn, wantedMediaID) if err != nil { return nil, gtserror.NewErrorNotFound(fmt.Errorf("error recaching media: %s", err)) } -- cgit v1.2.3