Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change keys for presto video response #51

Merged
merged 1 commit into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ Output Message:
"id": "A unique string ID that identifies the item being processed",
"callback_url": "A unique URL that will be requested upon completion",
"url": "The URL at which the media is located",
"bucket": "bucket within which the .tmk file is stored",
"outfile": "The filename of the .tmk file generated for the video",
"folder": "bucket within which the .tmk file is stored",
"filepath": "The filename of the .tmk file generated for the video",
"hash_value": "The shorter, getPureAverageFeature hash from tmk (used in first-pass approximation searches)",
}
```
Expand Down
2 changes: 1 addition & 1 deletion lib/model/video.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@ def process(self, video: schemas.Message) -> schemas.GenericItem:
s3.upload_file_to_s3(self.tmk_bucket(), self.tmk_file_path(video_filename))
finally:
os.remove(temp_file_name)
return dict(**video.dict(), **{"bucket": self.tmk_bucket(), "outfile": self.tmk_file_path(video_filename), "hash_value": hash_value})
return dict(**video.dict(), **{"folder": self.tmk_bucket(), "filepath": self.tmk_file_path(video_filename), "hash_value": hash_value})
4 changes: 2 additions & 2 deletions lib/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ class MediaItem(GenericItem):
hash_value: Optional[Any] = None

class VideoItem(MediaItem):
bucket: Optional[str] = None
outfile: Optional[str] = None
folder: Optional[str] = None
filepath: Optional[str] = None

class Message(BaseModel):
body: Union[MediaItem, VideoItem]
Expand Down
Loading