File
The File
model is the fundamental model for storing file references in the Redbox system. It maintains a lightweight reference to files location in S3.
redbox.models.file.File
Bases: PersistableModel
Reference to file stored on s3
uuid class-attribute
instance-attribute
uuid = Field(default_factory=uuid4)
created_datetime class-attribute
instance-attribute
created_datetime = Field(default_factory=utcnow)
creator_user_uuid instance-attribute
creator_user_uuid
model_type property
model_type
Return the name of the model class.
RETURNS | DESCRIPTION |
---|---|
str | The name of the model class. TYPE: |
key class-attribute
instance-attribute
key = Field(description='file key')
bucket class-attribute
instance-attribute
bucket = Field(description='s3 bucket')
ingest_status class-attribute
instance-attribute
ingest_status = Field(description='Status of file ingest for files loaded by new worker', default=None)
FileStatus
The File
model also has a companion FileStatus
model that helps track the status of the file processing. This nests ChunkStatus
models to see if chunks have been created and if they have been completely embedded yet.
redbox.models.file.FileStatus
Bases: BaseModel
Status of a file.
file_uuid instance-attribute
file_uuid
processing_status instance-attribute
processing_status
chunk_statuses instance-attribute
chunk_statuses