Added Celery task for deleting temporary files in tasks.py.

This commit is contained in:
Timothy Farrell 2024-07-15 11:09:50 -05:00 committed by Timothy Farrell (aider)
parent e9cc20e91d
commit a6f54e8c9e

7
tasks.py Normal file
View File

@ -0,0 +1,7 @@
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)