2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-02 19:50:59 +00:00

Switch to registry for tasks (#3790)

* Add general registering functions
Fixes #3787

* switch over to new method

* move to static type

* fix unclear naming
This commit is contained in:
Matthias Mair
2022-10-17 00:53:59 +02:00
committed by GitHub
parent 182bc29053
commit 0bea2c7b56
5 changed files with 84 additions and 61 deletions

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.