add sentry again
This commit is contained in:
parent
0fe6481419
commit
232b3882c3
2 changed files with 27 additions and 12 deletions
14
main.py
14
main.py
|
@ -7,6 +7,9 @@ from urllib.parse import urljoin
|
|||
import aiohttp
|
||||
import feedparser
|
||||
import yaml
|
||||
from raven import Client
|
||||
from raven.handlers.logging import SentryHandler
|
||||
from raven.conf import setup_logging
|
||||
from wallabag_api.wallabag import Wallabag
|
||||
|
||||
import github_stars
|
||||
|
@ -33,6 +36,17 @@ fh.setFormatter(formatter)
|
|||
fh.setLevel(logging.DEBUG)
|
||||
logger.addHandler(fh)
|
||||
|
||||
if "sentry_url" in config and ("debug" not in config or not config["debug"]):
|
||||
client = Client(
|
||||
dsn=config["sentry_url"],
|
||||
processors=(
|
||||
'raven.processors.SanitizePasswordsProcessor',
|
||||
)
|
||||
)
|
||||
handler = SentryHandler(client)
|
||||
handler.setLevel(logging.WARNING)
|
||||
setup_logging(handler)
|
||||
|
||||
with open("sites.yaml", 'r') as stream:
|
||||
try:
|
||||
sites = yaml.load(stream)
|
||||
|
|
|
@ -1,16 +1,17 @@
|
|||
aiodns==1.1.1
|
||||
aiohttp==3.1.3
|
||||
async-timeout==2.0.1
|
||||
attrs==17.4.0
|
||||
certifi==2018.1.18
|
||||
aiohttp==3.4.4
|
||||
async-timeout==3.0.0
|
||||
attrs==18.2.0
|
||||
certifi==2018.8.24
|
||||
chardet==3.0.4
|
||||
feedparser==5.2.1
|
||||
idna==2.6
|
||||
idna-ssl==1.0.1
|
||||
multidict==4.2.0
|
||||
idna==2.7
|
||||
idna-ssl==1.1.0
|
||||
multidict==4.4.2
|
||||
pycares==2.3.0
|
||||
PyYAML==3.12
|
||||
requests==2.18.4
|
||||
urllib3==1.22
|
||||
wallabag-api==1.2.2
|
||||
yarl==1.1.1
|
||||
PyYAML==3.13
|
||||
raven==6.9.0
|
||||
requests==2.19.1
|
||||
urllib3==1.23
|
||||
wallabag-api==1.2.3
|
||||
yarl==1.2.6
|
||||
|
|
Reference in a new issue