Refreshing actors meta view after profile interpolation.

This commit is contained in:
DebaucheryLibrarian 2024-10-22 02:31:20 +02:00
parent 149c83f34b
commit 1836de3441
1 changed files with 3 additions and 1 deletions

View File

@ -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 = {