Exemplo n.º 1
0
 def setUp(self):
     # XXX: might be a better way to do do this
     app.config['DATASTORE'] = {
         'ENGINE': 'sentry.db.backends.redis.RedisBackend',
         'OPTIONS': {
             'db': 9
         }
     }
     app.db = get_backend(app)
     
     # Flush the Redis instance
     app.db.conn.flushdb()
Exemplo n.º 2
0
 def setUp(self):
     # XXX: might be a better way to do do this
     app.config['DATASTORE'] = {
         'ENGINE': 'sentry.db.backends.redis.RedisBackend',
         'OPTIONS': {
             'db': 9
         }
     }
     app.config['CLIENT'] = 'sentry.client.base.SentryClient'
     app.db = get_backend(app)
     
     # Flush the Redis instance
     app.db.conn.flushdb()
     
     self.client = app.test_client()
Exemplo n.º 3
0
    def setUp(self):
        # XXX: might be a better way to do do this
        app.config['DATASTORE'] = {
            'ENGINE': 'sentry.db.backends.redis.RedisBackend',
            'OPTIONS': {
                'db': 9
            }
        }
        app.config['CLIENT'] = 'sentry.client.base.SentryClient'
        app.db = get_backend(app)

        # Flush the Redis instance
        app.db.conn.flushdb()

        self.client = app.test_client()
Exemplo n.º 4
0
app = Flask(__name__)

# OK CONTINUE WORKING

from flaskext.babel import Babel

from sentry.client import get_client
from sentry.db import get_backend

# Build configuration
app.config.from_object('sentry.conf.SentryConfig')
app.config.from_envvar('SENTRY_SETTINGS', silent=True)

# Load configured datastore
app.db = get_backend(app)

# Load configured client
app.client = get_client(app)

# Flask-Babel (internationalization)
app.babel = Babel(app)

# Shortcuts to be exported for API
capture = app.client.capture

# Import views/templatetags to ensure registration
import sentry.web.api
import sentry.web.templatetags
import sentry.web.views
Exemplo n.º 5
0
app = Flask(__name__)

# OK CONTINUE WORKING

from flaskext.babel import Babel

from sentry.core.cleaner import Cleaner
from sentry.client import ClientProxy
from sentry.db import get_backend

# Build configuration
app.config.from_object('sentry.conf.SentryConfig')
app.config.from_envvar('SENTRY_SETTINGS', silent=True)

# Load configured datastore
app.db = get_backend(app)

# Load configured client
app.client = ClientProxy(app)

# Flask-Babel (internationalization)
app.babel = Babel(app)


@app.before_request
def init_threads():
    """
    Attaches threads to the process on the first web request if 
    they're not already present.
    """
    if not hasattr(app, 'cleaner'):