예제 #1
0
def execute_shutdown_handlers():
    """Gracefully terminates the running application by running shutdown handlers.
  """
    logger.info('Executing shutdown handlers.')
    while _SHUTDOWN_HANDLERS:
        handler = _SHUTDOWN_HANDLERS.pop()  #  Make sure we only run once.
        handler()

    logger.info('Flushing metrics.')
    root_metric_store().flush_all_publishers()
예제 #2
0
파일: lifecycle.py 프로젝트: 40a/aurproxy
def execute_shutdown_handlers():
  """Gracefully terminates the running application by running shutdown handlers.
  """
  logger.info('Executing shutdown handlers.')
  while _SHUTDOWN_HANDLERS:
    handler = _SHUTDOWN_HANDLERS.pop() #  Make sure we only run once.
    handler()

  logger.info('Flushing metrics.')
  root_metric_store().flush_all_publishers()
예제 #3
0
파일: http.py 프로젝트: amperity/aurproxy
  def get(self):
    metrics = root_metric_store().get_metrics()
    ordered_metrics = sorted(metrics, key=lambda metric: metric.name)

    return dict((m.name, m.value()) for m in ordered_metrics)
예제 #4
0
파일: http.py 프로젝트: amperity/aurproxy
  def get(self):
    metrics = root_metric_store().get_metrics()
    ordered_metrics = sorted(metrics, key=lambda metric: metric.name)

    joined = '\n'.join(['%s %s' % (m.name, m.value()) for m in ordered_metrics])
    return Response(response=joined)
예제 #5
0
파일: http.py 프로젝트: tellapart/aurproxy
  def get(self):
    metrics = root_metric_store().get_metrics()
    ordered_metrics = sorted(metrics, key=lambda metric: metric.name)

    return dict((m.name, m.value()) for m in ordered_metrics)
예제 #6
0
파일: http.py 프로젝트: tellapart/aurproxy
  def get(self):
    metrics = root_metric_store().get_metrics()
    ordered_metrics = sorted(metrics, key=lambda metric: metric.name)

    joined = '\n'.join(['%s %s' % (m.name, m.value()) for m in ordered_metrics])
    return Response(response=joined)