Esempio n. 1
0
def base_app(tmp_shared_volume_path):
    """Flask application fixture."""
    config_mapping = {
        "SERVER_NAME": "localhost:5000",
        "SECRET_KEY": "SECRET_KEY",
        "TESTING": True,
        "SHARED_VOLUME_PATH": tmp_shared_volume_path,
        "SQLALCHEMY_DATABASE_URI": "sqlite://",
        "SQLALCHEMY_TRACK_MODIFICATIONS": False,
        "ORGANIZATIONS": ["default"],
    }
    app_ = create_app(config_mapping=config_mapping)
    return app_
Esempio n. 2
0
def app():
    """Test application."""
    app = create_app(JOB_DB, watch_jobs=False)
    with app.app_context():
        yield app
Esempio n. 3
0
# -*- coding: utf-8 -*-
#
# This file is part of REANA.
# Copyright (C) 2018 CERN.
#
# REANA is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""REANA-Job-Controller application instance."""

import logging

from reana_job_controller.factory import create_app
from reana_job_controller.job_db import JOB_DB

app = create_app(JOB_DB)

if __name__ == "__main__":
    app.run(host="0.0.0.0")