-
Notifications
You must be signed in to change notification settings - Fork 290
/
config.py
56 lines (54 loc) · 1.7 KB
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
import os
import socket
app_name = os.getenv('HEROKU_APP_NAME', socket.gethostname())
dyno = os.getenv('DYNO')
athena_query = os.getenv('AWS_ATHENA_PREPARE_STATEMENT')
config = {
'port': os.getenv('PORT') or 8080,
'session': {
'cookie_name': 'hedy',
# in minutes
'session_length': 60 * 24 * 14,
'reset_length': 60 * 4,
'invite_length': 60 * 24 * 7
},
'email': {
'sender': 'Hedy <[email protected]>',
'region': 'eu-central-1',
},
# The bcrypt library's default is 12
'bcrypt_rounds': 9,
'dynamodb': {
'region': 'eu-west-1'
},
's3-query-logs': {
'bucket': 'hedy-query-logs',
'prefix': app_name + '/',
# Make logs from different instances/processes unique
'postfix': ('-' + dyno if dyno else '') + '-' + str(os.getpid()),
'region': 'eu-west-1'
},
's3-parse-logs': {
'bucket': 'hedy-parse-logs',
'prefix': app_name + '/',
# Make logs from different instances/processes unique
'postfix': ('-' + dyno if dyno else '') + '-' + str(os.getpid()),
'region': 'eu-west-1'
},
's3-activity-logs': {
'bucket': 'hedy-activity-logs',
'prefix': app_name + '/',
# Make logs from different instances/processes unique
'postfix': ('-' + dyno if dyno else '') + '-' + str(os.getpid()),
'region': 'eu-west-1'
},
'athena': {
'region': 'eu-west-1',
'database': 'hedy-logs',
'prepare_statement': athena_query,
's3_output': 's3://hedy-query-outputs/',
'max_results': 50
},
# enables the quiz environment by setting the config variable on True
'quiz-enabled': True,
}