harp_apps.storage.services.blob_storages.sql¶
- class SqlBlobStorage[source]¶
Bases:
IBlobStorage- async delete(blob_id)[source]¶
Delete a blob from the database.
- Parameters:
blob_id – content hash identifying the blob (sha1 for message blobs, sha256 for cache entries)
- forget(blob_ids)[source]¶
Drop the seen entries for blobs deleted without going through delete.
Both put() and exists() answer from seen, so both are wrong about a swept blob until this is called.
- async get(blob_id)[source]¶
Retrieve a blob from the database, using its hash. Returns None if not found.
- Parameters:
blob_id – content hash identifying the blob (sha1 for message blobs, sha256 for cache entries)
- Returns:
Blob or None