debug++
This commit is contained in:
parent
ef53ee64c6
commit
570e5cc491
3 changed files with 20 additions and 0 deletions
|
@ -29,6 +29,7 @@ import { runUpcomingScheduledPostsLoop } from "./data/loops/upcomingScheduledPos
|
|||
import { runExpiringTempbansLoop } from "./data/loops/expiringTempbansLoop";
|
||||
import { runExpiringVCAlertsLoop } from "./data/loops/expiringVCAlertsLoop";
|
||||
import { runExpiredArchiveDeletionLoop } from "./data/loops/expiredArchiveDeletionLoop";
|
||||
import blockedAt from "blocked-at";
|
||||
|
||||
if (!process.env.KEY) {
|
||||
// tslint:disable-next-line:no-console
|
||||
|
@ -336,6 +337,13 @@ connect().then(async () => {
|
|||
logRateLimit(data);
|
||||
});
|
||||
|
||||
blockedAt(
|
||||
(time, stack) => {
|
||||
console.error(`Blocked for ${time}ms, operation started here:`, stack);
|
||||
},
|
||||
{ threshold: 750 },
|
||||
);
|
||||
|
||||
bot.on("loadingFinished", async () => {
|
||||
runExpiringMutesLoop();
|
||||
await sleep(10 * SECONDS);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue