Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
1e3efadc
Commit
1e3efadc
authored
11 years ago
by
Renzo Lucioni
Browse files
Options
Downloads
Patches
Plain Diff
switch to using environment variables to get key for Segment.io
parent
67bcbe22
Loading
Loading
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
cms/envs/aws.py
+4
-2
4 additions, 2 deletions
cms/envs/aws.py
cms/envs/common.py
+13
-3
13 additions, 3 deletions
cms/envs/common.py
cms/envs/dev.py
+6
-2
6 additions, 2 deletions
cms/envs/dev.py
with
23 additions
and
7 deletions
cms/envs/aws.py
+
4
−
2
View file @
1e3efadc
...
...
@@ -112,8 +112,10 @@ TIME_ZONE = ENV_TOKENS.get('TIME_ZONE', TIME_ZONE)
for
feature
,
value
in
ENV_TOKENS
.
get
(
'
MITX_FEATURES
'
,
{}).
items
():
MITX_FEATURES
[
feature
]
=
value
# load segment.io key, provide a dummy if it does not exist
SEGMENT_IO_KEY
=
ENV_TOKENS
.
get
(
'
SEGMENT_IO_KEY
'
,
'
***REMOVED***
'
)
# If Segment.io key specified, load it and turn on Segment.io if the feature flag is set
SEGMENT_IO_KEY
=
AUTH_TOKENS
.
get
(
'
SEGMENT_IO_KEY
'
)
if
SEGMENT_IO_KEY
:
MITX_FEATURES
[
'
SEGMENT_IO
'
]
=
ENV_TOKENS
.
get
(
'
SEGMENT_IO
'
,
False
)
LOGGING
=
get_logger_config
(
LOG_DIR
,
logging_env
=
ENV_TOKENS
[
'
LOGGING_ENV
'
],
...
...
This diff is collapsed.
Click to expand it.
cms/envs/common.py
+
13
−
3
View file @
1e3efadc
...
...
@@ -32,13 +32,23 @@ from path import path
MITX_FEATURES
=
{
'
USE_DJANGO_PIPELINE
'
:
True
,
'
GITHUB_PUSH
'
:
False
,
'
ENABLE_DISCUSSION_SERVICE
'
:
False
,
'
AUTH_USE_MIT_CERTIFICATES
'
:
False
,
'
STUB_VIDEO_FOR_TESTING
'
:
False
,
# do not display video when running automated acceptance tests
'
STAFF_EMAIL
'
:
''
,
# email address for staff (eg to request course creation)
# do not display video when running automated acceptance tests
'
STUB_VIDEO_FOR_TESTING
'
:
False
,
# email address for staff (eg to request course creation)
'
STAFF_EMAIL
'
:
''
,
'
STUDIO_NPS_SURVEY
'
:
True
,
'
SEGMENT_IO
'
:
True
,
# Segment.io - must explicitly turn it on for production
'
SEGMENT_IO
'
:
False
,
# Enable URL that shows information about the status of various services
'
ENABLE_SERVICE_STATUS
'
:
False
,
...
...
This diff is collapsed.
Click to expand it.
cms/envs/dev.py
+
6
−
2
View file @
1e3efadc
...
...
@@ -163,8 +163,12 @@ MITX_FEATURES['STUDIO_NPS_SURVEY'] = False
# Enable URL that shows information about the status of variuous services
MITX_FEATURES
[
'
ENABLE_SERVICE_STATUS
'
]
=
True
# segment-io key for dev
SEGMENT_IO_KEY
=
'
mty8edrrsg
'
############################# SEGMENT-IO ##################################
# If there's an environment variable set, grab it and turn on segment io
SEGMENT_IO_KEY
=
os
.
environ
.
get
(
'
SEGMENT_IO_KEY
'
)
if
SEGMENT_IO_KEY
:
MITX_FEATURES
[
'
SEGMENT_IO
'
]
=
True
#####################################################################
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment