code: def email_queue():
      
      status = SERVER_STATUS['OK']
      count = Message.objects.exclude(priority=PRIORITY_DEFERRED).filter(
          when_added__lte=now() - timedelta(minutes=QUEUE_TIMEOUT)).count()
  
      if QUEUE_WARNING_THRESHOLD <= count < QUEUE_DANGER_THRESHOLD:
          status = SERVER_STATUS['WARNING']
      if count >= QUEUE_DANGER_THRESHOLD:
          status = SERVER_STATUS['DANGER']
  
      return {
          'label': 'Queued Email',
          'status': status,
          'info': 'There are currently {0} messages in the mail queue.'.format(
              count)
      }
docs: Checks for emails, that fill up the queue without getting sent.