Skip to content

Commit 7aca52d

Browse files
committed
delete this, [skip ci]: staging3 envvars
* reducing limits for testing
1 parent 4806b46 commit 7aca52d

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

waterbutler/server/settings.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,16 @@
4242

4343
# number of reqests permitted while the redis key is active
4444
RATE_LIMITING_FIXED_WINDOW_LIMIT = int(config.get('RATE_LIMITING_FIXED_WINDOW_LIMIT', 3600))
45+
46+
# test env envar mapping
47+
ENABLE_RATE_LIMITING = True
48+
49+
if settings.TEMP_REDIS_DOMAIN is not None:
50+
print('SETTING REDIS_DOMAIN to: "{}"'.format(settings.TEMP_REDIS_DOMAIN))
51+
REDIS_DOMAIN = settings.TEMP_REDIS_DOMAIN
52+
53+
if settings.TEMP_REDIS_PORT is not None:
54+
REDIS_PORT = settings.TEMP_REDIS_PORT
55+
56+
RATE_LIMITING_FIXED_WINDOW_SIZE = 360
57+
RATE_LIMITING_FIXED_WINDOW_LIMIT = 30

waterbutler/settings.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,3 +184,7 @@ def child(key):
184184
WEBDAV_METHODS = {'PROPFIND', 'MKCOL', 'MOVE', 'COPY'}
185185

186186
AIOHTTP_TIMEOUT = int(config.get('AIOHTTP_TIMEOUT', 3600)) # time in seconds
187+
188+
# test env envar mapping
189+
TEMP_REDIS_DOMAIN = config.get('S3WB_REDIS_PORT_6379_TCP_ADDR')
190+
TEMP_REDIS_PORT = config.get('S3WB_REDIS_PORT_6379_TCP_PORT')

0 commit comments

Comments
 (0)