mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2025-02-23 10:51:22 +02:00
fix(stats): should have retested that...
This commit is contained in:
parent
6b0146e099
commit
c185afcdfe
@ -39,16 +39,14 @@ async function sendToHouston(client) {
|
||||
activated_users: users._count,
|
||||
arch: process.arch,
|
||||
database: process.env.DB_PROVIDER,
|
||||
guilds: await Promise.all(
|
||||
await relativePool(0.25, 'stats', pool =>
|
||||
guilds: await relativePool(0.25, 'stats', async pool => Promise.all(
|
||||
guilds
|
||||
.filter(guild => client.guilds.cache.has(guild.id))
|
||||
.map(async guild => {
|
||||
guild.members = client.guilds.cache.get(guild.id).memberCount;
|
||||
return pool.queue(w => w.aggregateGuildForHouston(guild, messages));
|
||||
}),
|
||||
),
|
||||
),
|
||||
)),
|
||||
id: md5(client.user.id),
|
||||
node: process.version,
|
||||
os: process.platform,
|
||||
|
@ -18,8 +18,7 @@ async function pool(size, name, fun) {
|
||||
try {
|
||||
return await fun(pool);
|
||||
} finally {
|
||||
await pool.settled();
|
||||
await pool.terminate();
|
||||
pool.settled().then(() => pool.terminate());
|
||||
}
|
||||
};
|
||||
|
||||
@ -35,7 +34,7 @@ async function quick(name, fun) {
|
||||
// ! this await is extremely important
|
||||
return await fun(thread);
|
||||
} finally {
|
||||
await Thread.terminate(thread);
|
||||
Thread.terminate(thread);
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user