2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-03 12:10:59 +00:00

Housekeeping Settings (#3821)

* Add new settings for controlling how long logged data is retained

* Update existing tasks to use new user-configurable values

- Also add a task to delete failed task logs

* Add background task to remove old notification logs
This commit is contained in:
Oliver
2022-10-20 23:27:09 +11:00
committed by GitHub
parent c3f6b75b30
commit 4ca2aa6cd8
3 changed files with 110 additions and 12 deletions

View File

@ -893,6 +893,39 @@ class InvenTreeSetting(BaseInvenTreeSetting):
'default': True,
},
'INVENTREE_DELETE_TASKS_DAYS': {
'name': _('Delete Old Tasks'),
'description': _('Background task results will be deleted after specified number of days'),
'default': 30,
'units': 'days',
'validator': [
int,
MinValueValidator(7),
]
},
'INVENTREE_DELETE_ERRORS_DAYS': {
'name': _('Delete Error Logs'),
'description': _('Error logs will be deleted after specified number of days'),
'default': 30,
'units': 'days',
'validator': [
int,
MinValueValidator(7)
]
},
'INVENTREE_DELETE_NOTIFICATIONS_DAYS': {
'name': _('Delete Noficiations'),
'description': _('User notifications will be deleted after specified number of days'),
'default': 30,
'units': 'days',
'validator': [
int,
MinValueValidator(7),
]
},
'BARCODE_ENABLE': {
'name': _('Barcode Support'),
'description': _('Enable barcode scanner support'),