def run(): # Takes run parameters from configuration. serverurl = urlparse(config.SERVER_BASE_URL) os.system('celery -A mhn.tasks --config=config beat &') os.system('celery -A mhn.tasks --config=config worker &') mhn.run(debug=config.DEBUG, host='0.0.0.0', port=serverurl.port)
def runlocal(): serverurl = urlparse(config.SERVER_BASE_URL) mhn.run(debug=config.DEBUG, host='0.0.0.0', port=serverurl.port)
#!/usr/bin/env python if __name__ == '__main__': from mhn import mhn mhn.run(debug=False, host='0.0.0.0', port=8000)
from gevent.wsgi import WSGIServer from mhn import mhn mhn.run(debug=True, host='0.0.0.0', port=5000) http_server = WSGIServer(('', 5000), mhn) http_server.serve_forever()
def run(): # Takes run parameters from configuration. serverurl = urlparse(config.SERVER_BASE_URL) mhn.run(debug=config.DEBUG, host='0.0.0.0', port=serverurl.port)