aitist/tasks.py

8 lines
191 B
Python

from celery import shared_task
@shared_task
def delete_temp_file(file_path):
"""Celery task to delete a temporary file."""
if os.path.exists(file_path):
os.remove(file_path)