this allows customizing the throttle settings value by updating a JSON
hash in the Setting table: `request_throttle.custom_settings` (see
formatting below)
The Setting value is a hash of client identifiers -> custom settings.
A custom setting is a hash with some subset of the following keys: hwm,
maximum, outflow, up_front_cost. the values of those keys are floats.
For example:
Setting.set(
'request_throttle.custom_settings',
{ 'user:10000000000001' => { 'hwm' => 1000.0 } }.to_json
)
these values will be used instead of the default values for requests
from that specific client_identifier
fixes CNVS-35965
test plan:
- set up a script that hammers the API and gets throttled
- create two users with two tokens
- set maximum and hwm to really high values for one (by user id), and
verify that it is no longer throttled
- repeat, but use the access token as the id
Change-Id: I8a5e393721c7cbd4c754989ba219f92f0e280ee1
Reviewed-on: https://gerrit.instructure.com/105302
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>