made pruner a daemon thread

This commit is contained in:
Alok Saldanha
2025-11-08 18:40:33 -05:00
parent 79fef57010
commit d747860118
5 changed files with 22 additions and 5 deletions

View File

@@ -115,6 +115,21 @@ docker run -it --rm \
-p 8080:8080 \
cellxgene-gateway
```
## Running cellxgene gateway with start scripts
For your convenience, we provide start scripts for flask, gunicorn and uwsgi.
First, set up a .env
```bash
cp env_example .env
# edit .env
open .env
```
Then run the scripts in a subshell
```bash
( ./start_flask.sh )
```
# Customization

View File

@@ -378,8 +378,10 @@ def ip_address():
def start_pruner_thread():
pruner = PruneProcessCache(cache)
background_thread = Thread(target=pruner)
# Run the pruner as a daemon thread so it won't block interpreter
# shutdown (for example when Ctrl-C is used in the main thread).
# This avoids "Exception ignored in: <module 'threading'...>" at exit.
background_thread = Thread(target=pruner, daemon=True)
background_thread.start()

View File

@@ -4,7 +4,7 @@
#
# PREREQUISITES:
# - Gunicorn installed (included with cellxgene 1.3.0, or: pip install gunicorn)
# - Virtual environment activated or .venv present
# - Virtual environment activated
# - .env file with CELLXGENE_LOCATION and CELLXGENE_DATA (or CELLXGENE_BUCKET)
#
# USAGE:

View File

@@ -4,7 +4,7 @@
#
# PREREQUISITES:
# - Gunicorn installed (included with cellxgene 1.3.0, or: pip install gunicorn)
# - Virtual environment activated or .venv present
# - Virtual environment activated
# - .env file with CELLXGENE_LOCATION and CELLXGENE_DATA (or CELLXGENE_BUCKET)
#
# USAGE:

View File

@@ -4,7 +4,7 @@
#
# PREREQUISITES:
# - uWSGI installed (pip install uwsgi)
# - Virtual environment activated or .venv present
# - Virtual environment activated
# - .env file with CELLXGENE_LOCATION and CELLXGENE_DATA (or CELLXGENE_BUCKET)
#
# USAGE: