Exemplo n.º 1
0
  (_options, args) = parser.parse_args(args)

  if len(args) > 0:
    parser.error("Didn't expect any positional args (%r)." % (args,))

  service = AggregatorService()
  try:
    service.run()
  finally:
    service.close()



if __name__ == "__main__":
  logging_support.LoggingSupport.initService()

  logger = _getLogger()
  logger.setLogPrefix('%s, SERVICE=AGGR' % getStandardLogPrefix())

  try:
    logger.info("{TAG:AGGR.START} argv=%r", sys.argv)
    main(sys.argv[1:])
  except KeyboardInterrupt as e:
    logger.info("Terminated via %r", e)
  except:
    logger.exception("{TAG:AGGR.STOP.ABORT}")
    raise

  logger.info("{TAG:AGGR.STOP.OK}")