Skip to content
Snippets Groups Projects
Commit 8401a718 authored by Tanner Prestegard's avatar Tanner Prestegard Committed by GraceDB
Browse files

Implement safeguards for no debug mode in production/playground

parent 4ea31b10
No related branches found
No related tags found
No related merge requests found
...@@ -7,3 +7,7 @@ DEBUG = False ...@@ -7,3 +7,7 @@ DEBUG = False
SEND_XMPP_ALERTS = True SEND_XMPP_ALERTS = True
SEND_PHONE_ALERTS = True SEND_PHONE_ALERTS = True
SEND_EMAIL_ALERTS = True SEND_EMAIL_ALERTS = True
# Safety check on debug mode for production
if (DEBUG == True):
raise RuntimeError("Turn off debug mode for production")
# Settings for a playground GraceDB instance (for user testing) running # Settings for a playground GraceDB instance (for user testing) running
# on a VM with Puppet provisioning. Starts with vm.py settings (which inherits # on a VM with Puppet provisioning. Starts with vm.py settings (which inherits
# from base.py settings) and overrides or adds to them. # from base.py settings) and overrides or adds to them.
import textwrap
from .base import * from .base import *
CONFIG_NAME = "USER TESTING" CONFIG_NAME = "USER TESTING"
...@@ -48,3 +47,7 @@ A nightly cron job removes events older than 14 days.</li> ...@@ -48,3 +47,7 @@ A nightly cron job removes events older than 14 days.</li>
<b>112</b>.</li> <b>112</b>.</li>
</ul> </ul>
""" """
# Safety check on debug mode for playground
if (DEBUG == True):
raise RuntimeError("Turn off debug mode for playground")
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
# settings) and overrides or adds to them. # settings) and overrides or adds to them.
from .base import * from .base import *
DEBUG = False
# LVAlert Overseer settings # LVAlert Overseer settings
LVALERT_OVERSEER_INSTANCES = [ LVALERT_OVERSEER_INSTANCES = [
{ {
...@@ -15,3 +17,7 @@ LVALERT_OVERSEER_INSTANCES = [ ...@@ -15,3 +17,7 @@ LVALERT_OVERSEER_INSTANCES = [
SEND_XMPP_ALERTS = True SEND_XMPP_ALERTS = True
SEND_PHONE_ALERTS = True SEND_PHONE_ALERTS = True
SEND_EMAIL_ALERTS = True SEND_EMAIL_ALERTS = True
# Safety check on debug mode for production
if (DEBUG == True):
raise RuntimeError("Turn off debug mode for production")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment