2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-13 18:45:40 +00:00

Tracing improvements (#6353)

* Prevent tracing in worker thread

* Tweak logic

* Further improvements

* Adds invoke command to launch gunicorn server

* Update docstring

* Add explicit check for migrations or data import

* Update tracing.py

Allow tracing in worker thread
This commit is contained in:
Oliver
2024-01-31 10:29:56 +11:00
committed by GitHub
parent 282ecebc39
commit 3bfde82394
3 changed files with 38 additions and 1 deletions

View File

@ -672,6 +672,20 @@ def wait(c):
return manage(c, 'wait_for_db')
@task(pre=[wait], help={'address': 'Server address:port (default=0.0.0.0:8000)'})
def gunicorn(c, address='0.0.0.0:8000'):
"""Launch a gunicorn webserver.
Note: This server will not auto-reload in response to code changes.
"""
c.run(
'gunicorn -c ./docker/gunicorn.conf.py InvenTree.wsgi -b {address} --chdir ./InvenTree'.format(
address=address
),
pty=True,
)
@task(pre=[wait], help={'address': 'Server address:port (default=127.0.0.1:8000)'})
def server(c, address='127.0.0.1:8000'):
"""Launch a (development) server using Django's in-built webserver.