rabbitmq-pdfparser 505 B

12345678910111213141516171819202122
  1. #!/usr/bin/env python
  2. import os
  3. import logging
  4. import asyncio
  5. from rabbitmq_pdfparser import run
  6. logger = logging.getLogger("mq2mq-pdfparser")
  7. logger.setLevel(os.environ.get('LOG_LEVEL', "DEBUG"))
  8. handler = logging.StreamHandler()
  9. handler.setFormatter(
  10. logging.Formatter(
  11. os.environ.get('LOG_FORMAT', "%(asctime)s [%(levelname)s] %(name)s: %(message)s")
  12. )
  13. )
  14. logger.addHandler(handler)
  15. loop = asyncio.get_event_loop()
  16. loop.run_until_complete(run(loop=loop, logger=logger))
  17. loop.close()