MinnDevelopment/discord-webhooks

Question about your queue

skateboard opened this issue · 2 comments

I was reading through WebhookClient and I was wondering after you send the first initial 5 webhooks will it wait to send the 6ith?

I made some mock code

WebhookClient client = WebhookClient.withUrl("WEBHOOK_URL");

for(int i = 0; i < 6; i++) {
   client.send("test #" + i);
}

after the 5th one I get

21:06:15.009 [Webhook-RateLimit Thread WebhookID: WEBHOOK_ID] DEBUG club.minnced.discord.webhook.WebhookClient - Backing off queue for 1999

but the 6ith is never sent? after waiting sometime it never sent so I was wondering if its setup to send after the wait or something.

The request will be delayed by backoffQueue. The only reason why it wouldn't send would be if you shutdown the executor/webhook client.

I tried your code and it works as expected:

image

That's extremely weird I only get to test #4