forked from FoundKeyGang/FoundKey
Improve performance
This commit is contained in:
parent
0cfca4a618
commit
c05586b53a
4 changed files with 20 additions and 10 deletions
|
@ -89,9 +89,11 @@ export default define(meta, async (ps, user) => {
|
||||||
|
|
||||||
const timeline = await query.take(ps.limit!).getMany();
|
const timeline = await query.take(ps.limit!).getMany();
|
||||||
|
|
||||||
|
process.nextTick(() => {
|
||||||
if (user) {
|
if (user) {
|
||||||
activeUsersChart.update(user);
|
activeUsersChart.update(user);
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
return await Notes.packMany(timeline, user);
|
return await Notes.packMany(timeline, user);
|
||||||
});
|
});
|
||||||
|
|
|
@ -192,9 +192,11 @@ export default define(meta, async (ps, user) => {
|
||||||
|
|
||||||
const timeline = await query.take(ps.limit!).getMany();
|
const timeline = await query.take(ps.limit!).getMany();
|
||||||
|
|
||||||
|
process.nextTick(() => {
|
||||||
if (user) {
|
if (user) {
|
||||||
activeUsersChart.update(user);
|
activeUsersChart.update(user);
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
return await Notes.packMany(timeline, user);
|
return await Notes.packMany(timeline, user);
|
||||||
});
|
});
|
||||||
|
|
|
@ -125,9 +125,11 @@ export default define(meta, async (ps, user) => {
|
||||||
|
|
||||||
const timeline = await query.take(ps.limit!).getMany();
|
const timeline = await query.take(ps.limit!).getMany();
|
||||||
|
|
||||||
|
process.nextTick(() => {
|
||||||
if (user) {
|
if (user) {
|
||||||
activeUsersChart.update(user);
|
activeUsersChart.update(user);
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
return await Notes.packMany(timeline, user);
|
return await Notes.packMany(timeline, user);
|
||||||
});
|
});
|
||||||
|
|
|
@ -177,7 +177,11 @@ export default define(meta, async (ps, user) => {
|
||||||
|
|
||||||
const timeline = await query.take(ps.limit!).getMany();
|
const timeline = await query.take(ps.limit!).getMany();
|
||||||
|
|
||||||
|
process.nextTick(() => {
|
||||||
|
if (user) {
|
||||||
activeUsersChart.update(user);
|
activeUsersChart.update(user);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
return await Notes.packMany(timeline, user);
|
return await Notes.packMany(timeline, user);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue