Example #1
0
 def process_exception(self, request, exception):
     from jogging import logging
     # Be very careful not to generate an exception when processing an exception
     try:
         logging.exception(exception=exception, request=request)
     except StandardError, e:
         import sys
         print >>sys.stdout, "ERROR: Exception occured while logging an exception: %s", repr(e)
Example #2
0
File: updater.py Project: sdb/sdb
def do_update(services):
  """ Updates the given services. """

  global running_update

  for service in services:
    feed = registry[service.name][0]
    try:
      if type(feed) is list:
        entries = []
        for f in feed:
          entries.extend(f(service))
      else:
        entries = feed(service)
      # TODO should be in a transaction
      for entry in entries:
        entry.save()
      service.updated = datetime.utcnow()
      service.save()
    except:
      logging.exception(msg='updater exception for service %s' %service.name, exception=True)
  running_update = False
 def process_exception(self, request, exception):
     from jogging import logging
     logging.exception(exception=exception, request=request)
Example #4
0
 def process_exception(self, request, exception):
     from jogging import logging
     logging.exception(exception=exception, request=request)