Skip to content

Commit

Permalink
remove the file of get_slug
Browse files Browse the repository at this point in the history
  • Loading branch information
mary-crkn committed Nov 12, 2024
1 parent e464cda commit 8156560
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions utils/upload_manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@
from redis.asyncio import Redis
from contextlib import asynccontextmanager
import logging
import botocore
import botocore.exceptions
from swift_config.swift_config import get_swift_connection
from utils.metadata_slug import get_slug_in_metadata
from utils.settings import container_name

#config logger
Expand Down Expand Up @@ -51,12 +50,6 @@ async def upload_manifest_backend(
raise HTTPException(status_code=500, detail="Failed to read the uploaded file.")
manifest = json.loads(content)
manifest_id = "/".join(manifest['id'].split('/')[-2:])
try:
slug_value_dict = get_slug_in_metadata(manifest['metadata'])
slug = slug_value_dict[0]
except Exception as e:
logger.error(f"Error extracting slug from manifest: {e}")
raise HTTPException(status_code=400, detail="Invalid manifest structure: missing slug.")

# Define the Redis lock key based on the slug
lock_key = f"lock_manifest_{manifest_id}"
Expand Down

0 comments on commit 8156560

Please sign in to comment.