Zomis / Duga

Stack Exchange Chat bot
18 stars 6 forks source link

Indepedent sleeps per room #55

Closed Zomis closed 9 years ago

Zomis commented 9 years ago

Currently the bot can only post in one room at a time, as the Thread.sleep is not room-dependent.

Let's say that 100 commits would be pushed in one room, and then a few seconds later some commits in another room, then it would take a loooooong time before all those other commits were posted, because those 100 commits from the first room would have to be finished first.

Zomis commented 9 years ago

This is a rate-limit in the Stack Exchange chat system. It's not per-room, but is likely per-ip (possibly combined with per-user). So there's no real reason to fix this, unless a PriorityQueue or something is used to give other rooms priority when there's been a long line of messages in another room.