mirror of
https://github.com/Novartis/cellxgene-gateway.git
synced 2026-09-15 12:47:59 +08:00
made pruner a daemon thread
This commit is contained in:
15
README.md
15
README.md
@@ -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
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user