Skip to content

Commit

Permalink
remove File from django
Browse files Browse the repository at this point in the history
  • Loading branch information
George Burton committed Sep 3, 2024
1 parent c0f74fb commit 26760bf
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions django_app/redbox_app/worker.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import logging
from uuid import UUID

from django.conf import settings

from redbox.loader.ingester import ingest_file
from redbox.models import File as CoreFile


def ingest(file_id: UUID):
Expand All @@ -15,12 +12,7 @@ def ingest(file_id: UUID):

logging.info("Ingesting file: %s", file)

core_file = CoreFile(
key=file.unique_name,
bucket=settings.BUCKET_NAME,
creator_user_uuid=file.user.id,
)
if error := ingest_file(core_file):
if error := ingest_file(file.unique_name):
file.status = StatusEnum.errored
file.ingest_error = error
else:
Expand Down

0 comments on commit 26760bf

Please sign in to comment.