Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@
from hubmap_commons.exceptions import HTTPException
from hubmap_commons.S3_worker import S3Worker

# Specify the absolute path of the instance folder and use the config file relative to the instance path
app = Flask(__name__, instance_path = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'instance'), instance_relative_config = True)
app.config.from_pyfile('app.cfg')

# Root logger configuration
global logger

Expand All @@ -60,10 +64,6 @@
# will be inherited by the sub-module loggers
logger = logging.getLogger()

# Specify the absolute path of the instance folder and use the config file relative to the instance path
app = Flask(__name__, instance_path = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'instance'), instance_relative_config = True)
app.config.from_pyfile('app.cfg')

# Remove trailing slash / from URL base to avoid "//" caused by config with trailing slash
app.config['UUID_API_URL'] = app.config['UUID_API_URL'].strip('/')
app.config['INGEST_API_URL'] = app.config['INGEST_API_URL'].strip('/')
Expand Down
3 changes: 1 addition & 2 deletions src/instance/app.cfg.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Set to False for PROD deployment to use INFO logging level
# Default to DEBUG for DEV/TEST
# Set to False to use INFO logging level
DEBUG_MODE = True

# Set to True to disable the PUT and POST calls to make entity-api READ-ONLY
Expand Down