Add configurable limits for number of builds allowed under a namespace
We also support that limit being increased automatically once a successful billing charge has gone through
This commit is contained in:
parent
62971b7f20
commit
9a452ace11
10 changed files with 125 additions and 33 deletions
13
config.py
13
config.py
|
@ -451,12 +451,6 @@ class DefaultConfig(ImmutableConfig):
|
|||
# Location of the static marketing site.
|
||||
STATIC_SITE_BUCKET = None
|
||||
|
||||
# Count and duration used to produce a rate of builds allowed to be queued per repository before
|
||||
# rejecting requests. Values less than zero disable rate limiting.
|
||||
# Example: 10 builds per minute is accomplished by setting ITEMS = 10, SECS = 60
|
||||
MAX_BUILD_QUEUE_RATE_ITEMS = -1
|
||||
MAX_BUILD_QUEUE_RATE_SECS = -1
|
||||
|
||||
# Site key and secret key for using recaptcha.
|
||||
FEATURE_RECAPTCHA = False
|
||||
RECAPTCHA_SITE_KEY = None
|
||||
|
@ -507,3 +501,10 @@ class DefaultConfig(ImmutableConfig):
|
|||
# If enabled, ensures that API calls are made with the X-Requested-With header
|
||||
# when called from a browser.
|
||||
BROWSER_API_CALLS_XHR_ONLY = True
|
||||
|
||||
# If set to a non-None integer value, the default number of maximum builds for a namespace.
|
||||
DEFAULT_NAMESPACE_MAXIMUM_BUILD_COUNT = None
|
||||
|
||||
# For Billing Support Only: The number of allowed builds on a namespace that has been billed
|
||||
# successfully.
|
||||
BILLED_NAMESPACE_MAXIMUM_BUILD_COUNT = None
|
||||
|
|
Reference in a new issue