forked from dcramer/sentry-old
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More general cleanup and compatibility with Flask. sentry.db.backend …
…is now sentry.db
- Loading branch information
Showing
12 changed files
with
98 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
/build | ||
/dist | ||
/*.egg-info | ||
*.egg | ||
*.db | ||
*.egg | ||
*.pid | ||
*.pyc | ||
*.log | ||
pip-log.txt | ||
.DS_Store | ||
/build | ||
/dist | ||
/*.egg-info | ||
/example_project/local_settings.py | ||
/docs/html | ||
/docs/doctrees | ||
/sentry_index | ||
/sentry/sentry_index/ | ||
/sentry/sentry_index/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
from flask import current_app as app | ||
from sentry import app | ||
|
||
_client = (None, None) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,5 @@ | ||
import datetime | ||
import hashlib | ||
|
||
from sentry import conf | ||
|
||
_backend = (None, None) | ||
|
||
def get_backend(): | ||
global _backend | ||
if _backend[0] != conf.BACKEND: | ||
engine = conf.BACKEND['ENGINE'] | ||
module, class_name = engine.rsplit('.', 1) | ||
_backend = (conf.BACKEND, getattr(__import__(module, {}, {}, class_name), class_name)(**conf.BACKEND.get('OPTIONS', {}))) | ||
return _backend[1] | ||
|
||
backend = get_backend() | ||
def get_backend(app): | ||
setting = app.config['DATASTORE'] | ||
engine = setting['ENGINE'] | ||
module, class_name = engine.rsplit('.', 1) | ||
return getattr(__import__(module, {}, {}, class_name), class_name)(**setting.get('OPTIONS', {})) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.