mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-29 21:37:34 -07:00
perf(server): Improver performance
This commit is contained in:
parent
35bc5b91ad
commit
dbeeeeb9e5
2 changed files with 4 additions and 2 deletions
|
@ -32,4 +32,4 @@ setInterval(() => {
|
||||||
fetchMeta(true).then(meta => {
|
fetchMeta(true).then(meta => {
|
||||||
cache = meta;
|
cache = meta;
|
||||||
});
|
});
|
||||||
}, 5000);
|
}, 1000 * 10);
|
||||||
|
|
|
@ -85,7 +85,9 @@ export default define(meta, async (ps, user) => {
|
||||||
|
|
||||||
const query = makePaginationQuery(Notifications.createQueryBuilder('notification'), ps.sinceId, ps.untilId)
|
const query = makePaginationQuery(Notifications.createQueryBuilder('notification'), ps.sinceId, ps.untilId)
|
||||||
.andWhere(`notification.notifieeId = :meId`, { meId: user.id })
|
.andWhere(`notification.notifieeId = :meId`, { meId: user.id })
|
||||||
.leftJoinAndSelect('notification.notifier', 'notifier');
|
.leftJoinAndSelect('notification.notifier', 'notifier')
|
||||||
|
.leftJoinAndSelect('notification.note', 'note')
|
||||||
|
.leftJoinAndSelect('note.user', 'user');
|
||||||
|
|
||||||
query.andWhere(`notification.notifierId NOT IN (${ mutingQuery.getQuery() })`);
|
query.andWhere(`notification.notifierId NOT IN (${ mutingQuery.getQuery() })`);
|
||||||
query.setParameters(mutingQuery.getParameters());
|
query.setParameters(mutingQuery.getParameters());
|
||||||
|
|
Loading…
Reference in a new issue