From cc9aaf235ea893ab5ff69e42d73aaaf7cdf644b3 Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Thu, 19 Aug 2021 01:02:59 +0300 Subject: [PATCH] ++debug --- backend/src/utils/hotfixMessageFetch.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/backend/src/utils/hotfixMessageFetch.ts b/backend/src/utils/hotfixMessageFetch.ts index 5810f6cc..5afea774 100644 --- a/backend/src/utils/hotfixMessageFetch.ts +++ b/backend/src/utils/hotfixMessageFetch.ts @@ -3,12 +3,17 @@ import { Queue } from "../Queue"; import { sleep } from "../utils"; const queue = new Queue(); +let n = 0; export function hotfixMessageFetch(channel: TextChannel | ThreadChannel, messageId: string): Promise { + const thisN = ++n; + + // tslint:disable-next-line:no-console + console.log(`[${thisN}] Queueing to fetch message id ${messageId} from channel ${channel.id}`); return queue.add(async () => { await sleep(3000); // tslint:disable-next-line:no-console - console.trace(`Fetching message id ${messageId} from channel ${channel.id}`); + console.trace(`[${thisN}] Fetching message id ${messageId} from channel ${channel.id}`); return channel.messages.fetch(messageId); }); }