Newer
Older
Brian Moe
committed
ALLOWED_HOSTS = ['*']
#EMAIL_HOST = 'gravity.phys.uwm.edu'
EMAIL_HOST = 'localhost'
Branson Stephens
committed
('Branson Stephens', 'branson@gravity.phys.uwm.edu'),
ALERT_EMAIL_FROM = "GraCEDb <gracedb@archie.phys.uwm.edu>"
ALERT_TEST_EMAIL_FROM = "GraCEDb TEST <gracedb@archie.phys.uwm.edu>"
#ALERT_XMPP_SERVER = "lvalert.phys.uwm.edu"
#ALERT_XMPP_SERVERS = ["lvalert.phys.uwm.edu", "lvalert.cgca.uwm.edu"]
ALERT_XMPP_SERVERS = ["lvalert.cgca.uwm.edu"]
#LVALERT_SEND_EXECUTABLE = '/usr/bin/lvalert_send'
LVALERT_SEND_EXECUTABLE = '/home/gracedb/djangoenv/bin/lvalert_send'
USE_LVALERT_OVERSEER = True
# For each lvalert server, a separate instance of the lvalert_overseer
# must be running and listening on a distinct port.
LVALERT_OVERSEER_PORTS = {
'lvalert.cgca.uwm.edu': 8000,
}
EMBB_MAIL_ADDRESS = 'embb@gracedb.ligo.org'
EMBB_SMTP_SERVER = 'localhost'
EMBB_MAIL_ADMINS = ['branson@gravity.phys.uwm.edu','roy.williams@ligo.org',]
EMBB_IGNORE_ADDRESSES = ['Mailer-Daemon@gracedb.phys.uwm.edu',]
# Added for django 1.7.8
TEST_RUNNER = 'django.test.runner.DiscoverRunner'
# 11/18/14. No longer checking XMPP_ALERT_CHANNELS. This is not necessary.
# If someone sends out an event, an alert should go out. Listerers have the
# option to unsubscribe from nodes if so desired.
#XMPP_ALERT_CHANNELS = [
# 'burst_omega',
# 'test_omega',
# 'cbc_mbtaonline',
# 'test_mbtaonline',
# 'burst_cwb',
# 'test_cwb',
# 'cbc_lowmass',
# 'test_lowmass',
# 'cbc_highmass',
# 'test_highmass',
# 'test_grb',
# 'external_grb',
# ]
SKYMAP_VIEWER_SERVICE_URL = "https://embb-dev.ligo.caltech.edu/skymap-viewer/aladin/skymap-viewer.cgi"

Branson Craig Stephens
committed
BLESSED_TAGS = [
Branson Stephens
committed
'background',
'strain',
'tfplots',
'sig_info',
'audio',
]

Branson Craig Stephens
committed
COINC_PIPELINES = [
'gstlal',
'gstlal-spiir',

Branson Craig Stephens
committed
'MBTAOnline',

Branson Craig Stephens
committed
]
GRB_PIPELINES = [
'Fermi',
'Swift',
]
DATABASES = {
'default' : {
'NAME' : 'gracedb',
'ENGINE' : 'django.db.backends.mysql',
'USER' : 'gracedb',
'PASSWORD' : 'redrum4x',

Branson Craig Stephens
committed
'OPTIONS' : {
'init_command': 'SET storage_engine=MyISAM',

Branson Craig Stephens
committed
},
}
}
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
'LOCATION': '127.0.0.1:11211',
}
}
Brian Moe
committed
# SkyAlert
SKYALERT_IVORN_PATTERN = "ivo://gwnet/gcn_sender#%s"
Brian Moe
committed
SKYALERT_ROLE = "test"
Branson Stephens
committed
SKYALERT_DESCRIPTION = "Report of a candidate gravitational wave event"
Brian Moe
committed
SKYALERT_SUBMITTERS = ['Patrick Brady', 'Brian Moe']
GRACEDB_DATA_DIR = "/mnt/gracedb-web/data"
#GRACEDB_DATA_DIR = "/mnt/gracedb-web-temp/data"
# First level subdirs with 2 chars, second level with 1 char
# These DIR_DIGITS had better add up to a number less than 40 (which is
# the length of a SHA-1 hexdigest. Actually, it should be way less than
# 40--or you're a crazy person.
GRACEDB_DIR_DIGITS = [2, 1,]
# Latency histograms. Where they go and max latency to bin.
LATENCY_REPORT_DEST_DIR = "/home/gracedb/data/latency"
LATENCY_MAXIMUM_CHARTED = 1800
LATENCY_REPORT_WEB_PAGE_FILE_PATH = LATENCY_REPORT_DEST_DIR + "/latency.inc"
# Uptime reporting
UPTIME_REPORT_DIR = "/home/gracedb/data/uptime"

Branson Craig Stephens
committed
# Rate file location
RATE_INFO_FILE = "/home/gracedb/data/rate_info.json"
# URL prefix for serving report information (usually plots and tables)
REPORT_INFO_URL_PREFIX = "/report_info/"
# CBC IFAR Reports
from utils import posixToGpsTime
from datetime import datetime, timedelta
import time
now = datetime.now()
yesterday = now - timedelta(days=1)
lastweek = now - timedelta(days=7)
now = posixToGpsTime(time.mktime(now.timetuple()))
yesterday = posixToGpsTime(time.mktime(yesterday.timetuple()))
lastweek = posixToGpsTime(time.mktime(lastweek.timetuple()))
REPORT_IFAR_IMAGE_DIR = LATENCY_REPORT_DEST_DIR
#REPORTS_IFAR = [
# #(query, axis_label, title, fname),
# ("LowMass %d..%d" % (yesterday, now),
# "GraceDB CBC LowMass ER1 events",
# "ER1 FARs from gstlal_ll_inspiral - last day",
# "ifar_day.png"
# ),
# ("LowMass %d..%d" % (lastweek, now),
# "GraceDB CBC LowMass ER1 events",
# "ER1 FARs from gstlal_ll_inspiral - last week",
# "ifar_week.png"
# ),
#]
REPORTS_IFAR = [
#(query, axis_label, title, fname),
("gstlal %d..%d" % (yesterday, now),
"GraceDB gstlal events",
"FARs from gstlal - last day",
("gstlal %d..%d" % (lastweek, now),
"GraceDB gstlal events",
"FARs from gstlal - last week",
# Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
# although not all choices may be available on all operating systems.
# If running in a Windows environment this must be set to the same as your
# system time zone.
# Language code for this installation. All choices can be found here:
# http://www.i18nguy.com/unicode/language-identifiers.html
LANGUAGE_CODE = 'en-us'
# If you set this to False, Django will make some optimizations so as not
# to load the internationalization machinery.
# Absolute path to the directory that holds media.
# Example: "/home/media/media.lawrence.com/"
#MEDIA_ROOT = ''
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash if there is a path component (optional in other cases).
# Examples: "http://media.lawrence.com", "http://example.com/media/"
#MEDIA_URL = '/gracedb-static/'
# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
# trailing slash.
# Examples: "http://foo.com/media/", "/media/".
ADMIN_MEDIA_PREFIX = '/media/'
# Make this unique, and don't share it with anybody.
SECRET_KEY = '$$&hl%^_4&s0k7sbdr8ll_^gkz-j8oab0tz$t^^b-%$!83d(av'
# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
#'django.template.loaders.filesystem.load_template_source',
# replaced by...
'django.template.loaders.filesystem.Loader',
# Upgrade to 1.4
#'django.template.loaders.app_directories.load_template_source',
'django.template.loaders.app_directories.Loader',
# 'django.template.loaders.eggs.load_template_source',
)
TEMPLATE_CONTEXT_PROCESSORS = (
#"django.core.context_processors.auth",
# replaced by...
"django.contrib.auth.context_processors.auth",
"django.core.context_processors.debug",
"django.core.context_processors.i18n",
"django.core.context_processors.media",
"gracedb.middleware.auth.LigoAuthContext",
'middleware.debug.LigoDebugContext',

Branson Craig Stephens
committed
'ligoauth.context_processors.shib_login_url',
Branson Stephens
committed
AUTHENTICATION_BACKENDS = (
# 'gracedb.middleware.auth.LigoAuthBackend',
'ligoauth.middleware.auth.LigoX509Backend',
'ligoauth.middleware.auth.LigoShibBackend',
'ligoauth.middleware.auth.LigoBasicBackend',

Branson Craig Stephens
committed
'ligoauth.middleware.auth.ModelBackend',
# 'ligoauth.middleware.auth.RemoteUserBackend',
# 'ligodjangoauth.LigoShibbolethAuthBackend',
# 'django.contrib.auth.backends.ModelBackend',

Branson Craig Stephens
committed
'guardian.backends.ObjectPermissionBackend',
Branson Stephens
committed
)

Branson Craig Stephens
committed
ANONYMOUS_USER_ID = -1
GUARDIAN_RENDER_403 = True

Branson Craig Stephens
committed
GUARDIAN_MONKEY_PATCH = False

Branson Craig Stephens
committed
Branson Stephens
committed
SHIB_AUTHENTICATION_SESSION_INITIATOR = 'https://moe.phys.uwm.edu/Shibboleth.sso/Login'

Branson Craig Stephens
committed
LOGIN_URL = '/Shibboleth.sso/Login'
# If these are left at default, when the Shibboleth middleware
# creates a new auth_user, they will get admin privs.
ADMIN_GROUP_HEADER = None
ADMIN_GROUP = None
'middleware.performance.PerformanceMiddleware',
'middleware.accept.AcceptMiddleware',
'middleware.cli.CliExceptionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
Branson Stephens
committed
'django.contrib.messages.middleware.MessageMiddleware',
# 'django.contrib.auth.middleware.AuthenticationMiddleware',
# 'ligodjangoauth.LigoShibbolethMiddleware',
'ligoauth.middleware.auth.LigoAuthMiddleware',
# 'django.contrib.auth.middleware.RemoteUserMiddleware',
'maintenancemode.middleware.MaintenanceModeMiddleware',
ROOT_URLCONF = 'urls'
TEMPLATE_DIRS = (
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
"/home/gracedb/graceproj/templates",
'django.contrib.contenttypes',
'django.contrib.sessions',
'gracedb',
'userprofile',

Branson Craig Stephens
committed
'guardian',
'PAGINATE_BY': 10,
'DEFAULT_THROTTLE_RATES': {
'event_creation': '1/second',
'annotation' : '10/second',
},
STATIC_ROOT = "/home/gracedb/graceproj/static/"

Branson Craig Stephens
committed
BOWER_URL = "/bower-static/"
BOWER_ROOT = "/home/gracedb/bower_components/"
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
# 'django.contrib.staticfiles.finders.DefaultStorageFinder',
)
STATICFILES_DIRS = ()

Branson Craig Stephens
committed
# Added in order to perform data migrations on the auth app
'auth' : 'migrations.auth',
'guardian' : 'migrations.guardian',
}

Branson Craig Stephens
committed
SOUTH_TESTS_MIGRATE = False
# passwords for LVEM scripted access expire after 365 days.
PASSWORD_EXPIRATION_TIME = timedelta(days=365)
'H1': '206.196.186.148',
# XXX The following Log settings are for a performance metric.
import logging
# Filter objects to separate out each level of alert.
class infoOnlyFilter(logging.Filter):
def filter(self,record):
if record.levelname=='INFO':
return 1
return 0
LOGGING = {
'version': 1,
'disable_existing_loggers' : True,
'formatters': {
'simple': {
'format': '%(asctime)s: %(message)s',
'datefmt': '%Y-%m-%dT%H:%M:%S',
},
},
'handlers': {
'null': {
'level':'DEBUG',
'class':'django.utils.log.NullHandler',
},
'info_file': {
'class': 'logging.handlers.TimedRotatingFileHandler',
'formatter': 'simple',
'filename': '%s/gracedb_info.log' % LOG_ROOT,
'when': 'midnight',
'backupCount' : 10,
},
'performance_file': {
Branson Stephens
committed
'class': 'logging.FileHandler',
'formatter': 'simple',
'filename': '%s/gracedb_performance.log' % LOG_ROOT,
},
},
'loggers': {
'django': {
'handlers': ['null'],
'propagate': True,
'level': 'INFO',
},
'gracedb': {
'handlers': ['info_file'],
'propagate': True,
'level' : 'INFO',
},
'middleware': {
'handlers': ['performance_file'],
'propagate': True,
'level': 'INFO',
},
},
}