mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-04-02 10:20:31 +08:00
implement MODULE_BUILD_SERVICE_DEVELOPER_ENV functionality
This commit is contained in:
@@ -22,8 +22,10 @@
|
||||
# SOFTWARE.
|
||||
#
|
||||
# Written by Petr Šabata <contyk@redhat.com>
|
||||
# Filip Valder <fvalder@redhat.com>
|
||||
|
||||
import imp
|
||||
import os
|
||||
|
||||
from os import sys
|
||||
|
||||
@@ -49,6 +51,9 @@ def _init_app_config(app):
|
||||
here = sys.path[0]
|
||||
if any(['nosetests' in arg for arg in sys.argv]):
|
||||
app.config.from_object('%s.TestConfiguration' % conf_module)
|
||||
elif 'MODULE_BUILD_SERVICE_DEVELOPER_ENV' in os.environ and \
|
||||
os.environ['MODULE_BUILD_SERVICE_DEVELOPER_ENV']:
|
||||
app.config.from_object('%s.DevConfiguration' % conf_module)
|
||||
elif here not in ('/usr/bin', '/bin', '/usr/local/bin'):
|
||||
app.config.from_object('%s.DevConfiguration' % conf_module)
|
||||
else:
|
||||
|
||||
@@ -291,8 +291,11 @@ def generatelocalhostcert():
|
||||
def runssl(host=conf.host, port=conf.port, debug=False):
|
||||
""" Runs the Flask app with the HTTPS settings configured in config.py
|
||||
"""
|
||||
logging.info('Starting Rida')
|
||||
logging.info('Starting Module Build Service frontend')
|
||||
ssl_ctx = _establish_ssl_context()
|
||||
if 'MODULE_BUILD_SERVICE_DEVELOPER_ENV' in os.environ and \
|
||||
os.environ['MODULE_BUILD_SERVICE_DEVELOPER_ENV']:
|
||||
debug = True
|
||||
app.run(
|
||||
host=host,
|
||||
port=port,
|
||||
|
||||
Reference in New Issue
Block a user