Updated raven plugin
- Added wrap_wsgi, celery_setup, celery_logging_setup hooks - Updated raven plugin docs - Updated production considerations docs - Added raven logging setup
This commit is contained in:
@@ -18,6 +18,7 @@ import os
|
||||
import sys
|
||||
|
||||
from celery import Celery
|
||||
from mediagoblin.tools.pluginapi import PluginManager
|
||||
|
||||
|
||||
MANDATORY_CELERY_IMPORTS = ['mediagoblin.processing.task']
|
||||
@@ -65,6 +66,9 @@ def setup_celery_app(app_config, global_config,
|
||||
celery_app = Celery()
|
||||
celery_app.config_from_object(celery_settings)
|
||||
|
||||
for callable_hook in PluginManager().get_hook_callables('celery_setup'):
|
||||
callable_hook(celery_app)
|
||||
|
||||
|
||||
def setup_celery_from_config(app_config, global_config,
|
||||
settings_module=DEFAULT_SETTINGS_MODULE,
|
||||
|
||||
@@ -22,6 +22,7 @@ from celery.signals import setup_logging
|
||||
|
||||
from mediagoblin import app, mg_globals
|
||||
from mediagoblin.init.celery import setup_celery_from_config
|
||||
from mediagoblin.tools.pluginapi import PluginManager
|
||||
|
||||
|
||||
OUR_MODULENAME = __name__
|
||||
@@ -46,6 +47,10 @@ def setup_logging_from_paste_ini(loglevel, **kw):
|
||||
|
||||
logging.config.fileConfig(logging_conf_file)
|
||||
|
||||
for callable_hook in \
|
||||
PluginManager().get_hook_callables('celery_logging_setup'):
|
||||
callable_hook()
|
||||
|
||||
|
||||
setup_logging.connect(setup_logging_from_paste_ini)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user