def main(): configure_logging() config = { '/': {'tools.gzip.on': True}, 'global': {'server.socket_host': "0.0.0.0"} } cherrypy.quickstart(MyAPI(), config=config)
def main(): configure_logging() while True: try: rb = TaskScheduler() logger.info('Worker initialized, waiting for jobs') rb.consume_jobs(worker_cb) except pika.exceptions.ConnectionClosed: logger.warning('RabbitMQ not present, retrying') time.sleep(1) continue
def main(): configure_logging() config = { '/': { 'tools.gzip.on': True }, 'global': { 'server.socket_host': "0.0.0.0" } } cherrypy.quickstart(MyAPI(), config=config)