From f2ee173aaefda67cee57e04a6821b17bffbd8a88 Mon Sep 17 00:00:00 2001
From: "Albert St. Aubin" <astaubin@edx.org>
Date: Wed, 21 Mar 2018 12:02:25 -0400
Subject: [PATCH] Increase the Throttle on the enrollments API to allow
 ecommerce to request more frequently

[LEARNER-4676]
---
 common/djangoapps/enrollment/views.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/common/djangoapps/enrollment/views.py b/common/djangoapps/enrollment/views.py
index bf4d749260e..01a7e8b6ced 100644
--- a/common/djangoapps/enrollment/views.py
+++ b/common/djangoapps/enrollment/views.py
@@ -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):
-- 
GitLab