old_contents: import asyncio
  
  # https://github.com/getsentry/raven-aiohttp
  
  
  async def sentry_handler(client, loop=None):
      loop = loop or asyncio.get_event_loop()
  
      def send_to_sentry(job, *exc_info):
          client.captureException(
              exc_info=exc_info,
              extra={
                  'job_id': job.id,
                  'func': job.func_name,
                  'args': job.args,
                  'kwargs': job.kwargs,
                  'description': job.description,
              }
          )
  
new_contents: # TODO: it should be async
  # https://github.com/getsentry/raven-aiohttp
  
  
  def sentry_handler(client):
  
      def send_to_sentry(exc_type, exc, message):
          client.captureException(
              extra={'message': message},
          )
          # The message that originated the error will be acknowledged
          return True
  
      return send_to_sentry
  
subject: Update sentry_handler