diff --git a/fabfile.py b/fabfile.py
index 1d74bbfa8..83ad0e447 100644
--- a/fabfile.py
+++ b/fabfile.py
@@ -320,6 +320,7 @@ def setup_installs():
'libdbd-pg-perl',
'libssl-dev',
'libffi-dev',
+ 'libevent-dev',
'make',
'pgbouncer',
'python-setuptools',
@@ -466,6 +467,21 @@ def setup_hosts():
put(os.path.join(env.SECRETS_PATH, 'configs/hosts'), '/etc/hosts', use_sudo=True)
sudo('echo "\n\n127.0.0.1 `hostname`" | sudo tee -a /etc/hosts')
+def setup_pgbouncer():
+ sudo('apt-get remove -y pgbouncer')
+ sudo('apt-get install -y libevent-dev')
+ PGBOUNCER_VERSION = '1.7'
+ with cd(env.VENDOR_PATH), settings(warn_only=True):
+ run('wget https://pgbouncer.github.io/downloads/files/%s/pgbouncer-%s.tar.gz' % (PGBOUNCER_VERSION, PGBOUNCER_VERSION))
+ run('tar -xzf pgbouncer-%s.tar.gz' % PGBOUNCER_VERSION)
+ run('rm pgbouncer-%s.tar.gz' % PGBOUNCER_VERSION)
+ with cd('pgbouncer-%s' % PGBOUNCER_VERSION):
+ run('./configure --prefix=/usr/local --with-libevent=libevent-prefix')
+ run('make')
+ sudo('make install')
+ sudo('ln -s /usr/local/bin/pgbouncer /usr/sbin/pgbouncer')
+ config_pgbouncer()
+
def config_pgbouncer():
put('config/pgbouncer.conf', 'pgbouncer.conf')
sudo('mv pgbouncer.conf /etc/pgbouncer/pgbouncer.ini')
diff --git a/settings.py b/settings.py
index 60e0e7b16..96554643f 100644
--- a/settings.py
+++ b/settings.py
@@ -170,10 +170,10 @@ LOGGING = {
'filters': ['require_debug_false'],
'include_html': True,
},
- 'sentry': {
- 'level': 'ERROR',
- 'class': 'raven.contrib.django.raven_compat.handlers.SentryHandler'
- },
+ # 'sentry': {
+ # 'level': 'ERROR',
+ # 'class': 'raven.contrib.django.raven_compat.handlers.SentryHandler'
+ # },
},
'loggers': {
'django.request': {
@@ -200,16 +200,16 @@ LOGGING = {
'level': 'INFO',
'propagate': True,
},
- 'raven': {
- 'level': 'DEBUG',
- 'handlers': ['console'],
- 'propagate': False,
- },
- 'sentry.errors': {
- 'level': 'DEBUG',
- 'handlers': ['console'],
- 'propagate': False,
- },
+ # 'raven': {
+ # 'level': 'DEBUG',
+ # 'handlers': ['console'],
+ # 'propagate': False,
+ # },
+ # 'sentry.errors': {
+ # 'level': 'DEBUG',
+ # 'handlers': ['console'],
+ # 'propagate': False,
+ # },
},
'filters': {
'require_debug_false': {
@@ -282,7 +282,7 @@ INSTALLED_APPS = (
'django.contrib.admin',
'django_extensions',
'djcelery',
- 'kombu.transport.django',
+ # 'kombu.transport.django',
'vendor.paypal.standard.ipn',
'apps.rss_feeds',
'apps.reader',
@@ -321,9 +321,9 @@ ZEBRA_ENABLE_APP = True
import djcelery
djcelery.setup_loader()
-from celery import Celery
-celeryapp = Celery()
-celeryapp.config_from_object('django.conf:settings')
+# from celery import Celery
+# celeryapp = Celery()
+# celeryapp.config_from_object('django.conf:settings')
CELERY_ROUTES = {
"work-queue": {
"queue": "work_queue",
@@ -524,6 +524,7 @@ REDIS_SESSIONS = {
}
CELERY_REDIS_DB_NUM = 4
+CELERY_REDIS_DB = CELERY_REDIS_DB_NUM
SESSION_REDIS_DB = 5
# =================
@@ -574,12 +575,12 @@ from local_settings import *
if not DEBUG:
INSTALLED_APPS += (
'gunicorn',
- 'raven.contrib.django.raven_compat',
+ 'raven.contrib.django',
'django_ses',
)
# RAVEN_CLIENT = raven.Client(dsn=SENTRY_DSN, release=raven.fetch_git_sha(os.path.dirname(__file__)))
- RAVEN_CLIENT = raven.Client(dsn=SENTRY_DSN)
+ RAVEN_CLIENT = raven.Client(SENTRY_DSN)
COMPRESS = not DEBUG
diff --git a/templates/maintenance_off.html b/templates/maintenance_off.html
index 1713cfb1d..256951777 100644
--- a/templates/maintenance_off.html
+++ b/templates/maintenance_off.html
@@ -85,7 +85,7 @@
Power cycling the redis DBs to fix the lag that's hit feed fetching all this week. This should take no longer than five minutes.
+Power cycling the PostgreSQL DBs to fix the lag that's hit feed fetching all this week. This should take no longer than two minutes.
To pass the time, check out what's popular on MLKSHK.