aboutsummaryrefslogtreecommitdiff
path: root/src/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'src/tasks')
-rw-r--r--src/tasks/cpuUsage.ts1
-rw-r--r--src/tasks/removeExpiredPunishements.ts1
-rw-r--r--src/tasks/updateCache.ts1
-rw-r--r--src/tasks/updateStats.ts1
-rw-r--r--src/tasks/updateSuperUsers.ts1
5 files changed, 5 insertions, 0 deletions
diff --git a/src/tasks/cpuUsage.ts b/src/tasks/cpuUsage.ts
index e597b31..882d660 100644
--- a/src/tasks/cpuUsage.ts
+++ b/src/tasks/cpuUsage.ts
@@ -8,6 +8,7 @@ export default class CpuUsageTask extends BushTask {
runOnStart: true
});
}
+
public override async exec() {
const cpu = await osu.cpu.usage(client.stats.cpu === undefined ? 100 : 60_000);
client.stats.cpu = cpu;
diff --git a/src/tasks/removeExpiredPunishements.ts b/src/tasks/removeExpiredPunishements.ts
index 6662292..8197cc5 100644
--- a/src/tasks/removeExpiredPunishements.ts
+++ b/src/tasks/removeExpiredPunishements.ts
@@ -8,6 +8,7 @@ export default class RemoveExpiredPunishmentsTask extends BushTask {
runOnStart: true
});
}
+
public override async exec() {
const expiredEntries = await ActivePunishment.findAll({
where: {
diff --git a/src/tasks/updateCache.ts b/src/tasks/updateCache.ts
index 16683f0..8bf92d5 100644
--- a/src/tasks/updateCache.ts
+++ b/src/tasks/updateCache.ts
@@ -9,6 +9,7 @@ export default class UpdateCacheTask extends BushTask {
runOnStart: false // done in preinit task
});
}
+
public override async exec() {
await UpdateCacheTask.updateGlobalCache(client);
await UpdateCacheTask.#updateGuildCache(client);
diff --git a/src/tasks/updateStats.ts b/src/tasks/updateStats.ts
index d6cabaa..8813343 100644
--- a/src/tasks/updateStats.ts
+++ b/src/tasks/updateStats.ts
@@ -8,6 +8,7 @@ export default class UpdateStatsTask extends BushTask {
runOnStart: true
});
}
+
public override async exec() {
const row =
(await Stat.findByPk(client.config.environment)) ?? (await Stat.create({ environment: client.config.environment }));
diff --git a/src/tasks/updateSuperUsers.ts b/src/tasks/updateSuperUsers.ts
index ffbf550..ba3e90c 100644
--- a/src/tasks/updateSuperUsers.ts
+++ b/src/tasks/updateSuperUsers.ts
@@ -8,6 +8,7 @@ export default class UpdateSuperUsersTask extends BushTask {
runOnStart: true
});
}
+
public override async exec() {
const superUsers = client.guilds.cache
.get(client.config.supportGuild.id)