Files
edx-platform/lms/djangoapps/course_api/__init__.py
Waheed Ahmed 780c1d982d Rate limit course list API.
This endpoint is likely being inefficient with how it's querying various parts
of the code and can take courseware down, it needs to be rate limited until
optimized.

LEARNER-5527
2018-06-13 16:59:32 +05:00

8 lines
379 B
Python

""" Course API """
from openedx.core.djangoapps.waffle_utils import (WaffleSwitch, WaffleSwitchNamespace)
WAFFLE_SWITCH_NAMESPACE = WaffleSwitchNamespace(name='course_list_api_rate_limit')
USE_RATE_LIMIT_2_FOR_COURSE_LIST_API = WaffleSwitch(WAFFLE_SWITCH_NAMESPACE, 'rate_limit_2')
USE_RATE_LIMIT_10_FOR_COURSE_LIST_API = WaffleSwitch(WAFFLE_SWITCH_NAMESPACE, 'rate_limit_10')