mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[performance] simpler throttling logic (#2407)
* reduce complexity of throttling logic to use 1 queue and an atomic int * use atomic add instead of CAS, add throttling test
This commit is contained in:
@ -42,6 +42,12 @@ var (
|
||||
StatusInternalServerErrorJSON = mustJSON(map[string]string{
|
||||
"status": http.StatusText(http.StatusInternalServerError),
|
||||
})
|
||||
ErrorCapacityExceeded = mustJSON(map[string]string{
|
||||
"error": "server capacity exceeded!",
|
||||
})
|
||||
ErrorRateLimitReached = mustJSON(map[string]string{
|
||||
"error": "rate limit reached!",
|
||||
})
|
||||
EmptyJSONObject = mustJSON("{}")
|
||||
EmptyJSONArray = mustJSON("[]")
|
||||
|
||||
|
Reference in New Issue
Block a user