mirror of
https://github.com/Novartis/cellxgene-gateway.git
synced 2026-09-15 12:47:59 +08:00
fixed linting and tests
This commit is contained in:
@@ -168,9 +168,8 @@ class CacheEntry:
|
||||
headers[h] = request.headers[h]
|
||||
|
||||
full_path = self.cellxgene_basepath() + subpath + querystring()
|
||||
|
||||
cellxgene_response = None
|
||||
try:
|
||||
cellxgene_response = None
|
||||
if request.method in ["GET", "HEAD", "OPTIONS"]:
|
||||
cellxgene_response = get(full_path, headers=headers)
|
||||
elif request.method == "PUT":
|
||||
|
||||
@@ -332,11 +332,13 @@ def launch():
|
||||
app.launchtime = current_time_stamp()
|
||||
app.run(host="0.0.0.0", port=env.gateway_port, debug=False)
|
||||
|
||||
|
||||
# When using servers like Gunicorn or uWSGI, this file is imported rather than run directly.
|
||||
# As a result, the main() function is never called automatically.
|
||||
# Therefore, we must initialize the data sources at import time to ensure they are available.
|
||||
initialize_data_sources()
|
||||
|
||||
|
||||
def main():
|
||||
"""CLI entry point for Flask development server."""
|
||||
launch()
|
||||
|
||||
Reference in New Issue
Block a user