Limit the number of concurrent restarts when nuking, or spawn each restart as a separate task #4
Labels
critical
Must be worked on as soon as possible
enhancement
New feature or request
lang: rust
Relevant to the Rust codebase
Currently, when executing
/registration nuke
, every user's registration is restarted concurrently, on the sametokio
task (which is spawned bypoise
andserenity
when handling the command).However, when restarting the registrations of hundreds of users, the high number of incoming and outgoing Discord websocket requests and database connections, combined with the insufficient database connection limit, leads to the operations being performed inconsistently.
This might be solved in one of three ways:
tokio
task, possibly combined with the above, to introduce some leeway for parallelism and avoid excessive load on one taskThe text was updated successfully, but these errors were encountered: