Not refreshing actors meta view by default.

This commit is contained in:
DebaucheryLibrarian 2024-10-24 22:08:25 +02:00
parent c068c759b2
commit c63e495516
1 changed files with 4 additions and 2 deletions

View File

@ -141,7 +141,7 @@ function mergeMainProfile(profile, mainProfile) {
return mergedProfile; return mergedProfile;
} }
export async function interpolateProfiles(actorIdsOrNames, context) { export async function interpolateProfiles(actorIdsOrNames, context, options = {}) {
const profiles = await fetchProfiles(actorIdsOrNames, context); const profiles = await fetchProfiles(actorIdsOrNames, context);
const profilesByActorId = profiles.reduce((acc, profile) => ({ const profilesByActorId = profiles.reduce((acc, profile) => ({
@ -303,5 +303,7 @@ export async function interpolateProfiles(actorIdsOrNames, context) {
.then(transaction.commit) .then(transaction.commit)
.catch(transaction.rollback); .catch(transaction.rollback);
await context.knex.schema.refreshMaterializedView('actors_meta'); if (options.refreshView) {
await context.knex.schema.refreshMaterializedView('actors_meta');
}
} }