Merge pull request #17741 from edx/aj/increase_enrollments_throttle

LEARNER-4676: Increase the Throttle on the enrollments API to allow ecommerce to re…
This commit is contained in:
Albert (AJ) St. Aubin
2018-03-21 16:22:47 -04:00
committed by GitHub

View File

@@ -74,9 +74,12 @@ class ApiKeyPermissionMixIn(object):
class EnrollmentUserThrottle(UserRateThrottle, ApiKeyPermissionMixIn):
"""Limit the number of requests users can make to the enrollment API."""
# The staff Throttle rate is currently being adjusted to meet the needs of the eCommerce API calls.
# This should be reviewed for performance and we should determine the optimum throttle for the needs of this API.
# https://openedx.atlassian.net/wiki/spaces/LEARNER/pages/645923004/eCommerce+Guild
THROTTLE_RATES = {
'user': '40/minute',
'staff': '1200/minute',
'staff': '2000/minute', # Decided on by looking at number of API calls to the Enrollment API from Staff users
}
def allow_request(self, request, view):