You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following function is supposed to clean all the existing documents in the ratelimits collection where dateEnd <= now, but it does not. Therefore once a limit is reached, it stays there forever.
There are two tables as you can see here: ratelimits and ratelimitsabuses. If it is the second one, they will indeed stay there forever since the goal of this table is to allow you to act on the reached limits.
If you want to remove them too, you can write a PR to add this behaviour as an option.
Encountered the same problem. Store saves dates as unix time, while declaring it as date. Mongoose seems to convert it to date for remove query but not when saving.
Calling remove directly on collection is the least invasive quick fix:
The following function is supposed to clean all the existing documents in the ratelimits collection where dateEnd <= now, but it does not. Therefore once a limit is reached, it stays there forever.
async _removeAll() { await this.Ratelimits.remove({ dateEnd: { $lte: Date.now() } }); }
The text was updated successfully, but these errors were encountered: