Projet

Général

Profil

Télécharger (688 octets) Statistiques
| Branche: | Tag: | Révision:

root / mandaye_server.py @ d33bb414

1
#!/usr/bin/env python
2
# -*- coding: utf-8 -*-
3

    
4
""" Script to launch mandaye with gunicorn server
5
"""
6

    
7
import sys
8
import os
9

    
10
from mandaye.log import logger
11
from gunicorn.app.wsgiapp import WSGIApplication
12

    
13
class WSGIApplication(WSGIApplication):
14

    
15
    def init(self, parser, opts, args):
16
        self.cfg.set("default_proc_name", "mandaye.wsgi:application")
17
        self.app_uri = "mandaye.wsgi:application"
18

    
19
        sys.path.insert(0, os.getcwd())
20

    
21
def main():
22
    """ The ``gunicorn`` command line runner for launcing Gunicorn with
23
    generic WSGI applications.
24
    """
25
    logger.info('Mandaye start')
26
    WSGIApplication("%prog [OPTIONS]").run()
27

    
28
if __name__ == "__main__":
29
    main()
(7-7/9)