feat: Add healthcheck

This commit is contained in:
2024-10-10 18:35:22 +02:00
parent e38234b736
commit 74a6b5f2aa
4 changed files with 30 additions and 8 deletions

View File

@@ -1,5 +1,6 @@
from notfellchen.celery import app as celery_app
from .tools.admin import clean_locations, deactivate_unchecked_adoption_notices
from .tools.misc import healthcheck_ok
from .models import Location, AdoptionNotice
@@ -17,3 +18,7 @@ def task_deactivate_unchecked():
def add_adoption_notice_location(pk):
instance = AdoptionNotice.objects.get(pk=pk)
Location.add_location_to_object(instance)
@celery_app.task(name="tools.healthcheck")
def task_healthcheck():
healthcheck_ok()