Fix task register (#3805)

* fix schedule registration

* add collection step for tasks

* make tasks register configurable

* extend docs

* Also run InvenTree setup in testing

* fix import loading method

* fix wrong task registration

* do not test

* do only distinct testing

* ignore import error for coverage
This commit is contained in:
Matthias Mair authored and GitHub committed 2022-10-18 16:54:10 +11:00
1 parent 3956a45c48
commit 269b269de3
5 files changed
+110 -58

No files matched your search

+3
View File
@@ -5,9 +5,12 @@ from datetime import datetime, timedelta
from django.core.exceptions import AppRegistryNotReady
from InvenTree.tasks import ScheduledTask, scheduled_task
logger = logging.getLogger('inventree')
@scheduled_task(ScheduledTask.DAILY)
def delete_old_notifications():
"""Remove old notifications from the database.