Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
configuration
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
configuration
Commits
02874323
Commit
02874323
authored
May 23, 2018
by
Fred Smith
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reduce number of if statements
parent
385273fd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
15 deletions
+11
-15
playbooks/roles/edxapp/templates/edx/app/edxapp/cms.sh.j2
+4
-5
playbooks/roles/edxapp/templates/edx/app/edxapp/lms.sh.j2
+4
-4
playbooks/roles/edxapp/templates/edx/app/edxapp/worker.sh.j2
+3
-6
No files found.
playbooks/roles/edxapp/templates/edx/app/edxapp/cms.sh.j2
View file @
02874323
...
...
@@ -6,11 +6,7 @@
{
%
if
COMMON_ENABLE_NEWRELIC_APP %
}
{
%
set
executable
=
edxapp_venv_bin +
'/newrelic-admin run-program '
+ edxapp_venv_bin +
'/gunicorn'
%
}
{
%
else
%
}
{
%
set
executable
=
edxapp_venv_bin +
'/gunicorn'
%
}
{
% endif %
}
{
%
if
COMMON_ENABLE_NEWRELIC_APP %
}
export
NEW_RELIC_APP_NAME
=
"{{ EDXAPP_NEWRELIC_CMS_APPNAME }}"
export
NEW_RELIC_CONFIG_FILE
=
"{{ edxapp_app_dir }}/newrelic.ini"
if
command
-v
ec2metadata
>
/dev/null 2>&1
;
then
...
...
@@ -19,7 +15,10 @@ if command -v ec2metadata >/dev/null 2>&1; then
export
NEW_RELIC_PROCESS_HOST_DISPLAY_NAME
=
"
$HOSTNAME
-
$INSTANCEID
"
fi
export
NEW_RELIC_LICENSE_KEY
=
"{{ NEWRELIC_LICENSE_KEY }}"
{
% endif -%
}
{
%
else
%
}
{
%
set
executable
=
edxapp_venv_bin +
'/gunicorn'
%
}
{
% endif %
}
export
PORT
=
"{{ edxapp_cms_gunicorn_port }}"
export
ADDRESS
=
"{{ edxapp_cms_gunicorn_host }}"
...
...
playbooks/roles/edxapp/templates/edx/app/edxapp/lms.sh.j2
View file @
02874323
...
...
@@ -6,11 +6,7 @@
{
%
if
COMMON_ENABLE_NEWRELIC_APP %
}
{
%
set
executable
=
edxapp_venv_bin +
'/newrelic-admin run-program '
+ edxapp_venv_bin +
'/gunicorn'
%
}
{
%
else
%
}
{
%
set
executable
=
edxapp_venv_bin +
'/gunicorn'
%
}
{
% endif %
}
{
%
if
COMMON_ENABLE_NEWRELIC_APP %
}
export
NEW_RELIC_APP_NAME
=
"{{ EDXAPP_NEWRELIC_LMS_APPNAME }}"
export
NEW_RELIC_CONFIG_FILE
=
"{{ edxapp_app_dir }}/newrelic.ini"
if
command
-v
ec2metadata
>
/dev/null 2>&1
;
then
...
...
@@ -19,6 +15,10 @@ if command -v ec2metadata >/dev/null 2>&1; then
export
NEW_RELIC_PROCESS_HOST_DISPLAY_NAME
=
"
$HOSTNAME
-
$INSTANCEID
"
fi
export
NEW_RELIC_LICENSE_KEY
=
"{{ NEWRELIC_LICENSE_KEY }}"
{
%
else
%
}
{
%
set
executable
=
edxapp_venv_bin +
'/gunicorn'
%
}
{
% endif -%
}
export
PORT
=
"{{ edxapp_lms_gunicorn_port }}"
...
...
playbooks/roles/edxapp/templates/edx/app/edxapp/worker.sh.j2
View file @
02874323
...
...
@@ -5,17 +5,14 @@
{
%
set
edxapp_venv_bin
=
edxapp_venv_dir +
"/bin"
%
}
{
%
if
COMMON_ENABLE_NEWRELIC_APP %
}
{
%
set
executable
=
edxapp_venv_bin +
'/newrelic-admin run-program '
+ edxapp_venv_bin +
'/python'
%
}
{
%
else
%
}
{
%
set
executable
=
edxapp_venv_bin +
'/python'
%
}
{
% endif %
}
{
%
if
COMMON_ENABLE_NEWRELIC_APP %
}
export
NEW_RELIC_CONFIG_FILE
=
"{{ edxapp_app_dir }}/newrelic.ini"
if
command
-v
ec2metadata
>
/dev/null 2>&1
;
then
INSTANCEID
=
$(
ec2metadata
--instance-id
)
;
HOSTNAME
=
$(
hostname
)
export
NEW_RELIC_PROCESS_HOST_DISPLAY_NAME
=
"
$HOSTNAME
-
$INSTANCEID
"
fi
{
% endif -%
}
{
%
else
%
}
{
%
set
executable
=
edxapp_venv_bin +
'/python'
%
}
{
% endif %
}
{{
executable
}}
{{
edxapp_code_dir
}}
/manage.py
$@
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment