fixed linting and tests

This commit is contained in:
Alok Saldanha
2025-11-04 06:27:56 -05:00
parent 903d25763f
commit 3e5accad65
5 changed files with 97 additions and 7 deletions

View File

@@ -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":

View File

@@ -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()