mirror of
https://github.com/ae-utbm/sith.git
synced 2025-03-10 07:17:11 +00:00
Enable honcho on non debug
This commit is contained in:
parent
8528820d89
commit
6841d96455
@ -80,6 +80,7 @@ sith/
|
|||||||
├── pyproject.toml (30)
|
├── pyproject.toml (30)
|
||||||
├── .venv/ (31)
|
├── .venv/ (31)
|
||||||
├── .python-version (32)
|
├── .python-version (32)
|
||||||
|
├── Procfile (33)
|
||||||
└── README.md
|
└── README.md
|
||||||
```
|
```
|
||||||
</div>
|
</div>
|
||||||
@ -136,7 +137,8 @@ sith/
|
|||||||
de certaines d'entre elles.
|
de certaines d'entre elles.
|
||||||
31. Dossier d'environnement virtuel généré par uv
|
31. Dossier d'environnement virtuel généré par uv
|
||||||
32. Fichier qui contrôle quelle version de python utiliser pour le projet
|
32. Fichier qui contrôle quelle version de python utiliser pour le projet
|
||||||
|
33. Fichier qui contrôle les services additionnels à lancer
|
||||||
|
avec le serveur de développement
|
||||||
|
|
||||||
## L'application principale
|
## L'application principale
|
||||||
|
|
||||||
|
@ -20,9 +20,15 @@ class Command(Runserver):
|
|||||||
OpenApi.compile()
|
OpenApi.compile()
|
||||||
# Run all other web processes but only if debug mode is enabled
|
# Run all other web processes but only if debug mode is enabled
|
||||||
# Also protects from re-launching the server if django reloads it
|
# Also protects from re-launching the server if django reloads it
|
||||||
if os.environ.get(DJANGO_AUTORELOAD_ENV) is None and settings.DEBUG:
|
if os.environ.get(DJANGO_AUTORELOAD_ENV) is None:
|
||||||
logging.getLogger("django").info("Running complementary processes")
|
logging.getLogger("django").info("Running complementary processes")
|
||||||
with subprocess.Popen([sys.executable, "-m", "honcho", "start"]):
|
with subprocess.Popen(
|
||||||
|
[sys.executable, "-m", "honcho", "start"],
|
||||||
|
env={
|
||||||
|
**os.environ,
|
||||||
|
**{"BUNDLER_MODE": "serve" if settings.DEBUG else "compile"},
|
||||||
|
},
|
||||||
|
):
|
||||||
super().run(**options)
|
super().run(**options)
|
||||||
return
|
return
|
||||||
super().run(**options)
|
super().run(**options)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user