From f79d50b9b26590b6d2468aeb41f0846272e08d1a Mon Sep 17 00:00:00 2001 From: kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com> Date: Mon, 15 Apr 2024 14:22:21 +0100 Subject: [performance] cached oauth database types (#2838) * update token + client code to use struct caches * add code comments * slight tweak to default mem ratios * fix envparsing * add appropriate invalidate hooks * update the tokenstore sweeping function to rely on caches * update to use PutClient() * add ClientID to list of token struct indices --- cmd/gotosocial/action/testrig/testrig.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cmd') diff --git a/cmd/gotosocial/action/testrig/testrig.go b/cmd/gotosocial/action/testrig/testrig.go index 0769b8878..79361375b 100644 --- a/cmd/gotosocial/action/testrig/testrig.go +++ b/cmd/gotosocial/action/testrig/testrig.go @@ -98,8 +98,8 @@ var Start action.GTSAction = func(ctx context.Context) error { testrig.StandardStorageSetup(state.Storage, "./testrig/media") // Initialize workers. - state.Workers.Start() - defer state.Workers.Stop() + testrig.StartNoopWorkers(&state) + defer testrig.StopWorkers(&state) // build backend handlers transportController := testrig.NewTestTransportController(&state, testrig.NewMockHTTPClient(func(req *http.Request) (*http.Response, error) { -- cgit v1.2.3