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);
|
.transacting(transaction);
|
||||||
|
|
||||||
// insert new interpolated data
|
// 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)
|
.where('id', profile.id)
|
||||||
.update(profile)
|
.update(profile)
|
||||||
.transacting(transaction));
|
.transacting(transaction));
|
||||||
|
@ -273,6 +273,8 @@ async function interpolateProfiles(actorIdsOrNames, context) {
|
||||||
await Promise.all(queries)
|
await Promise.all(queries)
|
||||||
.then(transaction.commit)
|
.then(transaction.commit)
|
||||||
.catch(transaction.rollback);
|
.catch(transaction.rollback);
|
||||||
|
|
||||||
|
await context.knex.schema.refreshMaterializedView('actors_meta');
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
|
Loading…
Reference in New Issue