mirror of
https://github.com/Novartis/cellxgene-gateway.git
synced 2026-10-04 03:08:12 +08:00
Addresses the issue where Gunicorn/uWSGI servers import the gateway module but never call main(), leaving item_sources empty and causing the file crawler to fail. Changes: - Extract data source initialization into initialize_data_sources() - Call initialization at module import time for WSGI compatibility - Add _initialized flag to prevent double initialization - Simplify main() to delegate to initialize_data_sources() This ensures data sources are populated when running under WSGI servers (Gunicorn, uWSGI) while maintaining backward compatibility with the Flask development server. Related to GitHub issues #33 and #92