2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-16 12:05:53 +00:00

Tasks cleanup (#8838)

* Pretty print and typo fix

* Improved output

* Improve logging
This commit is contained in:
Oliver
2025-01-06 10:06:38 +11:00
committed by GitHub
parent 0614f01247
commit 40cff05864
2 changed files with 28 additions and 22 deletions

View File

@ -219,11 +219,9 @@ if DEBUG and 'collectstatic' not in sys.argv:
# Append directory for sample plugin static content (if in debug mode)
if PLUGINS_ENABLED:
print('Adding plugin sample static content')
logger.info('Adding plugin sample static content')
STATICFILES_DIRS.append(BASE_DIR.joinpath('plugin', 'samples', 'static'))
print('-', STATICFILES_DIRS[-1])
# Database backup options
# Ref: https://django-dbbackup.readthedocs.io/en/master/configuration.html
DBBACKUP_SEND_EMAIL = False
@ -1037,7 +1035,9 @@ if SITE_URL:
validator = URLValidator()
validator(SITE_URL)
except Exception:
print(f"Invalid SITE_URL value: '{SITE_URL}'. InvenTree server cannot start.")
msg = f"Invalid SITE_URL value: '{SITE_URL}'. InvenTree server cannot start."
logger.error(msg)
print(msg)
sys.exit(-1)
else: