2
0
mirror of https://github.com/inventree/InvenTree.git synced 2026-05-06 17:53:44 +00:00

Enable verbosity option for worker command (#11862)

This commit is contained in:
Oliver
2026-05-04 21:15:42 +10:00
committed by GitHub
parent 2a5925f4f7
commit 118bc63b6b
+10 -4
View File
@@ -1553,10 +1553,16 @@ def server(c, address='0.0.0.0:8000', no_reload=False, no_threading=False):
manage(c, cmd, pty=True) manage(c, cmd, pty=True)
@task(pre=[wait]) @task(pre=[wait], help={'verbose': 'Print verbose output from the command'})
def worker(c): def worker(c, verbose: bool = False):
"""Run the InvenTree background worker process.""" """Run the InvenTree background worker process.
manage(c, 'qcluster', pty=True)
Launches a django-q2 cluster to process background tasks.
Ref: https://django-q2.readthedocs.io
"""
cmd = f'qcluster -v {2 if verbose else 0}'
manage(c, cmd, pty=True)
@task(post=[static, server]) @task(post=[static, server])