From c63e495516f43be7ef747b47e8b96bc112d53dee Mon Sep 17 00:00:00 2001 From: DebaucheryLibrarian Date: Thu, 24 Oct 2024 22:08:25 +0200 Subject: [PATCH] Not refreshing actors meta view by default. --- actors.mjs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/actors.mjs b/actors.mjs index 1c9609e..dfdf966 100644 --- a/actors.mjs +++ b/actors.mjs @@ -141,7 +141,7 @@ function mergeMainProfile(profile, mainProfile) { return mergedProfile; } -export async function interpolateProfiles(actorIdsOrNames, context) { +export async function interpolateProfiles(actorIdsOrNames, context, options = {}) { const profiles = await fetchProfiles(actorIdsOrNames, context); const profilesByActorId = profiles.reduce((acc, profile) => ({ @@ -303,5 +303,7 @@ export async function interpolateProfiles(actorIdsOrNames, context) { .then(transaction.commit) .catch(transaction.rollback); - await context.knex.schema.refreshMaterializedView('actors_meta'); + if (options.refreshView) { + await context.knex.schema.refreshMaterializedView('actors_meta'); + } }