mirror of
https://github.com/discordeno/discordeno.git
synced 2026-09-17 08:47:22 +00:00
some hacky fix
This commit is contained in:
+14
-1
@@ -6,4 +6,17 @@ import "./util/validate_length.ts";
|
||||
import "./util/loop_object.ts";
|
||||
|
||||
// Final cleanup
|
||||
import "./stop_sweepers.ts";
|
||||
|
||||
import { cache } from "../src/cache.ts";
|
||||
import { delay } from "../src/util/utils.ts";
|
||||
if (import.meta.main) {
|
||||
// clear all the sweeper intervals
|
||||
for (const c of Object.values(cache)) {
|
||||
if (!(c instanceof Map)) continue;
|
||||
|
||||
c.stopSweeper();
|
||||
console.log("Cleaned");
|
||||
}
|
||||
|
||||
await delay(3000);
|
||||
}
|
||||
|
||||
+14
-1
@@ -74,4 +74,17 @@ import "./discoveries/valid_discovery_term.ts";
|
||||
// Final cleanup
|
||||
import "./guilds/delete_guild.ts";
|
||||
import "./ws/ws_close.ts";
|
||||
import "./stop_sweepers.ts";
|
||||
|
||||
import { cache } from "../src/cache.ts";
|
||||
import { delay } from "../src/util/utils.ts";
|
||||
if (import.meta.main) {
|
||||
// clear all the sweeper intervals
|
||||
for (const c of Object.values(cache)) {
|
||||
if (!(c instanceof Map)) continue;
|
||||
|
||||
c.stopSweeper();
|
||||
console.log("Cleaned");
|
||||
}
|
||||
|
||||
await delay(3000);
|
||||
}
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
import { cache } from "../src/cache.ts";
|
||||
|
||||
// Exit the Deno process once all tests are done.
|
||||
Deno.test({
|
||||
name: "[chache] Stop all sweepers manually.",
|
||||
fn() {
|
||||
// clear all the sweeper intervals
|
||||
for (const c of Object.values(cache)) {
|
||||
if (!(c instanceof Map)) continue;
|
||||
|
||||
c.stopSweeper();
|
||||
}
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user