This repository has been archived on 2023-02-21. You can view files and clone it, but cannot push or open issues or pull requests.
mandaye/mandaye_server.py

30 lines
699 B
Python
Executable File

#!/home/jschneider/temp/test/bin/python
# -*- coding: utf-8 -*-
""" Script to launch mandaye with gunicorn server
"""
import logging
import sys
import os
from gunicorn.app.wsgiapp import WSGIApplication
class WSGIApplication(WSGIApplication):
def init(self, parser, opts, args):
self.cfg.set("default_proc_name", "mandaye.wsgi:application")
self.app_uri = "mandaye.wsgi:application"
sys.path.insert(0, os.getcwd())
def main():
""" The ``gunicorn`` command line runner for launcing Gunicorn with
generic WSGI applications.
"""
logging.info('Launching Mandaye ...')
WSGIApplication("%prog [OPTIONS]").run()
if __name__ == "__main__":
main()