From 1836de34413f9422841fc9f172c87a40235109c6 Mon Sep 17 00:00:00 2001 From: DebaucheryLibrarian Date: Tue, 22 Oct 2024 02:31:20 +0200 Subject: [PATCH] Refreshing actors meta view after profile interpolation. --- src/actors.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/actors.js b/src/actors.js index 0075962..8443c01 100644 --- a/src/actors.js +++ b/src/actors.js @@ -265,7 +265,7 @@ async function interpolateProfiles(actorIdsOrNames, context) { .transacting(transaction); // insert new interpolated data - const queries = interpolatedProfiles.map((profile) => context.knex('actors') + const queries = interpolatedProfiles.map(async (profile) => context.knex('actors') .where('id', profile.id) .update(profile) .transacting(transaction)); @@ -273,6 +273,8 @@ async function interpolateProfiles(actorIdsOrNames, context) { await Promise.all(queries) .then(transaction.commit) .catch(transaction.rollback); + + await context.knex.schema.refreshMaterializedView('actors_meta'); } module.exports = {