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:
14
tasks.py
14
tasks.py
@ -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.
|
||||
|
Reference in New Issue
Block a user