コード例 #1
0
ファイル: runserver.py プロジェクト: docent-net/pagure
#!/usr/bin/env python2

# These two lines are needed to run on EL6
__requires__ = ['SQLAlchemy >= 0.8', 'jinja2 >= 2.4']
import pkg_resources

import sys
from werkzeug.contrib.profiler import ProfilerMiddleware

from pagure import APP
APP.debug = True

if '--profile' in sys.argv:
    APP.config['PROFILE'] = True
    APP.wsgi_app = ProfilerMiddleware(APP.wsgi_app, restrictions=[30])

port = None
if len(sys.argv) == 2:
    port = int(sys.argv[1])

APP.run(port=port)
コード例 #2
0
ファイル: runserver.py プロジェクト: sudhirverma/pagure
    help='Expand the level of data returned.')
parser.add_argument(
    '--profile', dest='profile', action='store_true',
    default=False,
    help='Profile Pagure.')
parser.add_argument(
    '--port', '-p', default=5000,
    help='Port for the Pagure to run on.')
parser.add_argument(
    '--host', default="127.0.0.1",
    help='Hostname to listen on. When set to 0.0.0.0 the server is available externally. Defaults to 127.0.0.1 making the it only visable on localhost')

args = parser.parse_args()

from pagure import APP

if args.profile:
    from werkzeug.contrib.profiler import ProfilerMiddleware
    APP.config['PROFILE'] = True
    APP.wsgi_app = ProfilerMiddleware(APP.wsgi_app, restrictions=[30])

if args.config:
    config = args.config
    if not config.startswith('/'):
        here = os.path.join(os.path.dirname(os.path.abspath(__file__)))
        config = os.path.join(here, config)
    os.environ['PAGURE_CONFIG'] = config

APP.debug = True
APP.run(host=args.host, port=int(args.port))
コード例 #3
0
ファイル: runserver.py プロジェクト: kunaaljain/pagure
#!/usr/bin/env python2

# These two lines are needed to run on EL6
__requires__ = ['SQLAlchemy >= 0.8', 'jinja2 >= 2.4']
import pkg_resources

import sys
from werkzeug.contrib.profiler import ProfilerMiddleware

from pagure import APP
APP.debug = True

if '--profile' in sys.argv:
    APP.config['PROFILE'] = True
    APP.wsgi_app = ProfilerMiddleware(APP.wsgi_app, restrictions=[30])

APP.run(threaded=True)
コード例 #4
0
ファイル: runserver.py プロジェクト: aavrug/pagure
                    help='Configuration file to use for packages.')
parser.add_argument('--debug',
                    dest='debug',
                    action='store_true',
                    default=False,
                    help='Expand the level of data returned.')
parser.add_argument('--profile',
                    dest='profile',
                    action='store_true',
                    default=False,
                    help='Profile the packages2 application.')
parser.add_argument('--port',
                    '-p',
                    default=5000,
                    help='Port for the flask application.')

args = parser.parse_args()

from pagure import APP

if args.profile:
    from werkzeug.contrib.profiler import ProfilerMiddleware
    APP.config['PROFILE'] = True
    APP.wsgi_app = ProfilerMiddleware(APP.wsgi_app, restrictions=[30])

if args.config:
    os.environ['PAGURE_CONFIG'] = args.config

APP.debug = True
APP.run(port=int(args.port))
コード例 #5
0
ファイル: runserver.py プロジェクト: girish946/pagure
    description='Run the packages2 app')
parser.add_argument(
    '--config', '-c', dest='config',
    help='Configuration file to use for packages.')
parser.add_argument(
    '--debug', dest='debug', action='store_true',
    default=False,
    help='Expand the level of data returned.')
parser.add_argument(
    '--profile', dest='profile', action='store_true',
    default=False,
    help='Profile the packages2 application.')
parser.add_argument(
    '--port', '-p', default=5000,
    help='Port for the flask application.')

args = parser.parse_args()

from pagure import APP

if args.profile:
    from werkzeug.contrib.profiler import ProfilerMiddleware
    APP.config['PROFILE'] = True
    APP.wsgi_app = ProfilerMiddleware(APP.wsgi_app, restrictions=[30])

if args.config:
    os.environ['PAGURE_CONFIG'] = args.config

APP.debug = True
APP.run(port=int(args.port))
コード例 #6
0
ファイル: runserver.py プロジェクト: DhritiShikhar/pagure
#!/usr/bin/env python2

# These two lines are needed to run on EL6
__requires__ = ['SQLAlchemy >= 0.8', 'jinja2 >= 2.4']
import pkg_resources

import sys
from werkzeug.contrib.profiler import ProfilerMiddleware

from pagure import APP
APP.debug = True

if '--profile' in sys.argv:
    APP.config['PROFILE'] = True
    APP.wsgi_app = ProfilerMiddleware(APP.wsgi_app, restrictions=[30])

APP.run()
コード例 #7
0
ファイル: runserver.py プロジェクト: rahulbajaj0509/pagure
parser.add_argument(
    '--debug', dest='debug', action='store_true',
    default=False,
    help='Expand the level of data returned.')
parser.add_argument(
    '--profile', dest='profile', action='store_true',
    default=False,
    help='Profile the packages2 application.')
parser.add_argument(
    '--port', '-p', default=5000,
    help='Port for the flask application.')

args = parser.parse_args()

from pagure import APP

if args.profile:
    from werkzeug.contrib.profiler import ProfilerMiddleware
    APP.config['PROFILE'] = True
    APP.wsgi_app = ProfilerMiddleware(APP.wsgi_app, restrictions=[30])

if args.config:
    config = args.config
    if not config.startswith('/'):
        here = os.path.join(os.path.dirname(os.path.abspath(__file__)))
        config = os.path.join(here, config)
    os.environ['PAGURE_CONFIG'] = config

APP.debug = True
APP.run(host='0.0.0.0', port=int(args.port))
コード例 #8
0
ファイル: runserver.py プロジェクト: DhritiShikhar/pagure
#!/usr/bin/env python2

# These two lines are needed to run on EL6
__requires__ = ["SQLAlchemy >= 0.8", "jinja2 >= 2.4"]
import pkg_resources

import sys
from werkzeug.contrib.profiler import ProfilerMiddleware

from pagure import APP

APP.debug = True

if "--profile" in sys.argv:
    APP.config["PROFILE"] = True
    APP.wsgi_app = ProfilerMiddleware(APP.wsgi_app, restrictions=[30])

APP.run()
コード例 #9
0
#!/usr/bin/env python2

# These two lines are needed to run on EL6
__requires__ = ['SQLAlchemy >= 0.8', 'jinja2 >= 2.4']
import pkg_resources

import sys
from werkzeug.contrib.profiler import ProfilerMiddleware

from pagure import APP
from pagure.docs_server import APP
APP.debug = True

if '--profile' in sys.argv:
    APP.config['PROFILE'] = True
    APP.wsgi_app = ProfilerMiddleware(APP.wsgi_app, restrictions=[30])

APP.run(port=5001)
コード例 #10
0
ファイル: runserver.py プロジェクト: jepio/pagure
parser.add_argument(
    '--debug', dest='debug', action='store_true',
    default=False,
    help='Expand the level of data returned.')
parser.add_argument(
    '--profile', dest='profile', action='store_true',
    default=False,
    help='Profile the packages2 application.')
parser.add_argument(
    '--port', '-p', default=5000,
    help='Port for the flask application.')

args = parser.parse_args()

from pagure import APP

if args.profile:
    from werkzeug.contrib.profiler import ProfilerMiddleware
    APP.config['PROFILE'] = True
    APP.wsgi_app = ProfilerMiddleware(APP.wsgi_app, restrictions=[30])

if args.config:
    config = args.config
    if not config.startswith('/'):
        here = os.path.join(os.path.dirname(os.path.abspath(__file__)))
        config = os.path.join(here, config)
    os.environ['PAGURE_CONFIG'] = config

APP.debug = True
APP.run(host='127.0.0.1', port=int(args.port))