mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
Using @dcramer's excellent getsentry.com for all exceptions. Turning off exception emails.
This commit is contained in:
parent
ca43ea8555
commit
a75554374b
3 changed files with 18 additions and 9 deletions
|
@ -11,7 +11,8 @@ from django.conf import settings
|
|||
from django.utils.text import compress_string
|
||||
from utils import log as logging
|
||||
from apps.rss_feeds.models import MFeedPage
|
||||
from utils.feed_functions import timelimit, mail_feed_error_to_admin
|
||||
from utils.feed_functions import timelimit
|
||||
# from utils.feed_functions import mail_feed_error_to_admin
|
||||
|
||||
BROKEN_PAGES = [
|
||||
'tag:',
|
||||
|
@ -120,7 +121,10 @@ class PageImporter(object):
|
|||
logging.debug(tb)
|
||||
logging.debug('[%d] ! -------------------------' % (self.feed.id,))
|
||||
self.feed.save_page_history(500, "Error", tb)
|
||||
mail_feed_error_to_admin(self.feed, e, local_vars=locals())
|
||||
# mail_feed_error_to_admin(self.feed, e, local_vars=locals())
|
||||
if (not settings.DEBUG and hasattr(settings, 'RAVEN_CLIENT') and
|
||||
settings.RAVEN_CLIENT):
|
||||
settings.RAVEN_CLIENT.captureException()
|
||||
if not urllib_fallback:
|
||||
self.fetch_page(urllib_fallback=True)
|
||||
else:
|
||||
|
|
|
@ -149,7 +149,7 @@ LOGGING = {
|
|||
},
|
||||
'loggers': {
|
||||
'django.request': {
|
||||
'handlers': ['mail_admins'],
|
||||
'handlers': ['console', 'log_file'],
|
||||
'level': 'ERROR',
|
||||
'propagate': True,
|
||||
},
|
||||
|
|
|
@ -18,7 +18,8 @@ from apps.statistics.models import MAnalyticsFetcher
|
|||
from utils import feedparser
|
||||
from utils.story_functions import pre_process_story
|
||||
from utils import log as logging
|
||||
from utils.feed_functions import timelimit, TimeoutError, mail_feed_error_to_admin, utf8encode
|
||||
from utils.feed_functions import timelimit, TimeoutError, utf8encode
|
||||
# from utils.feed_functions import mail_feed_error_to_admin
|
||||
|
||||
|
||||
# Refresh feed code adapted from Feedjack.
|
||||
|
@ -386,7 +387,7 @@ class Dispatcher:
|
|||
feed.save_feed_history(500, "Error", tb)
|
||||
feed_code = 500
|
||||
fetched_feed = None
|
||||
mail_feed_error_to_admin(feed, e, local_vars=locals())
|
||||
# mail_feed_error_to_admin(feed, e, local_vars=locals())
|
||||
if (not settings.DEBUG and hasattr(settings, 'RAVEN_CLIENT') and
|
||||
settings.RAVEN_CLIENT):
|
||||
settings.RAVEN_CLIENT.captureException()
|
||||
|
@ -431,8 +432,10 @@ class Dispatcher:
|
|||
feed.save_page_history(550, "Page Error", tb)
|
||||
fetched_feed = None
|
||||
page_data = None
|
||||
mail_feed_error_to_admin(feed, e, local_vars=locals())
|
||||
settings.RAVEN_CLIENT.captureException()
|
||||
# mail_feed_error_to_admin(feed, e, local_vars=locals())
|
||||
if (not settings.DEBUG and hasattr(settings, 'RAVEN_CLIENT') and
|
||||
settings.RAVEN_CLIENT):
|
||||
settings.RAVEN_CLIENT.captureException()
|
||||
|
||||
feed = self.refresh_feed(feed.pk)
|
||||
logging.debug(u' ---> [%-30s] ~FYFetching icon: %s' % (feed.title[:30], feed.feed_link))
|
||||
|
@ -449,8 +452,10 @@ class Dispatcher:
|
|||
logging.error(tb)
|
||||
logging.debug('[%d] ! -------------------------' % (feed_id,))
|
||||
# feed.save_feed_history(560, "Icon Error", tb)
|
||||
mail_feed_error_to_admin(feed, e, local_vars=locals())
|
||||
settings.RAVEN_CLIENT.captureException()
|
||||
# mail_feed_error_to_admin(feed, e, local_vars=locals())
|
||||
if (not settings.DEBUG and hasattr(settings, 'RAVEN_CLIENT') and
|
||||
settings.RAVEN_CLIENT):
|
||||
settings.RAVEN_CLIENT.captureException()
|
||||
else:
|
||||
logging.debug(u' ---> [%-30s] ~FBSkipping page fetch: (%s on %s stories) %s' % (feed.title[:30], self.feed_trans[ret_feed], feed.stories_last_month, '' if feed.has_page else ' [HAS NO PAGE]'))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue