diff --git a/InvenTree/InvenTree/settings.py b/InvenTree/InvenTree/settings.py index 1a298240bc..0826c7d042 100644 --- a/InvenTree/InvenTree/settings.py +++ b/InvenTree/InvenTree/settings.py @@ -211,6 +211,7 @@ INSTALLED_APPS = [ 'djmoney', # django-money integration 'djmoney.contrib.exchange', # django-money exchange rates 'error_report', # Error reporting in the admin interface + 'django_q', ] MIDDLEWARE = CONFIG.get('middleware', [ @@ -285,6 +286,18 @@ REST_FRAMEWORK = { WSGI_APPLICATION = 'InvenTree.wsgi.application' +# django-q configuration +Q_CLUSTER = { + 'name': 'InvenTree', + 'workers': 4, + 'timeout': 90, + 'retry': 120, + 'queue_limit': 50, + 'bulk': 10, + 'orm': 'default', + 'sync': True, +} + # Markdownx configuration # Ref: https://neutronx.github.io/django-markdownx/customization/ MARKDOWNX_MEDIA_PATH = datetime.now().strftime('markdownx/%Y/%m/%d') diff --git a/requirements.txt b/requirements.txt index 7bbc14bd54..2c8bd9f3e7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -30,5 +30,6 @@ django-error-report==0.2.0 # Error report viewer for the admin interface django-test-migrations==1.1.0 # Unit testing for database migrations python-barcode[images]==0.13.1 # Barcode generator qrcode[pil]==6.1 # QR code generator +django-q==1.3.4 # Background task scheduling inventree # Install the latest version of the InvenTree API python library