2024-10-09 19:54:31 +00:00
|
|
|
from notfellchen.celery import app as celery_app
|
|
|
|
from .tools.admin import clean_locations
|
2024-10-10 05:39:44 +00:00
|
|
|
from .models import Location, AdoptionNotice
|
|
|
|
|
2024-10-09 19:54:31 +00:00
|
|
|
|
|
|
|
@celery_app.task(name="admin.clean_locations")
|
|
|
|
def task_clean_locations():
|
|
|
|
clean_locations()
|
2024-10-10 05:39:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
@celery_app.task(name="commit.add_location")
|
|
|
|
def add_adoption_notice_location(pk):
|
|
|
|
instance = AdoptionNotice.objects.get(pk=pk)
|
|
|
|
Location.add_location_to_object(instance)
|
|
|
|
|