Refreshing actors meta view after profile interpolation.
This commit is contained in:
parent
149c83f34b
commit
1836de3441
|
@ -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 = {
|
||||
|
|
Loading…
Reference in New Issue