Skip to content

Commit

Permalink
delete this, [skip ci]: staging3 envvars
Browse files Browse the repository at this point in the history
 * reducing limits for testing
  • Loading branch information
felliott committed Nov 22, 2021
1 parent 4806b46 commit 7aca52d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
13 changes: 13 additions & 0 deletions waterbutler/server/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,16 @@

# number of reqests permitted while the redis key is active
RATE_LIMITING_FIXED_WINDOW_LIMIT = int(config.get('RATE_LIMITING_FIXED_WINDOW_LIMIT', 3600))

# test env envar mapping
ENABLE_RATE_LIMITING = True

if settings.TEMP_REDIS_DOMAIN is not None:
print('SETTING REDIS_DOMAIN to: "{}"'.format(settings.TEMP_REDIS_DOMAIN))
REDIS_DOMAIN = settings.TEMP_REDIS_DOMAIN

if settings.TEMP_REDIS_PORT is not None:
REDIS_PORT = settings.TEMP_REDIS_PORT

RATE_LIMITING_FIXED_WINDOW_SIZE = 360
RATE_LIMITING_FIXED_WINDOW_LIMIT = 30
4 changes: 4 additions & 0 deletions waterbutler/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,3 +184,7 @@ def child(key):
WEBDAV_METHODS = {'PROPFIND', 'MKCOL', 'MOVE', 'COPY'}

AIOHTTP_TIMEOUT = int(config.get('AIOHTTP_TIMEOUT', 3600)) # time in seconds

# test env envar mapping
TEMP_REDIS_DOMAIN = config.get('S3WB_REDIS_PORT_6379_TCP_ADDR')
TEMP_REDIS_PORT = config.get('S3WB_REDIS_PORT_6379_TCP_PORT')

0 comments on commit 7aca52d

Please sign in to comment.