swh.vault.interface module#
- class swh.vault.interface.VaultInterface(*args, **kwargs)[source]#
Bases:
Protocol
Backend Interface for the Software Heritage vault.
- download_url(bundle_type: str, swhid: CoreSWHID, content_disposition: str | None = None, expiry: timedelta | None = None) str | None [source]#
Obtain bundle direct download link if the vault cache backend supports it.
- cook(bundle_type: str, swhid: CoreSWHID, email: str | None = None) Dict[str, Any] [source]#
Main entry point for cooking requests. This starts a cooking task if needed, and add the given e-mail to the notify list
- set_progress(bundle_type: str, swhid: CoreSWHID, progress: str) None [source]#
Set the cooking progress of a bundle
- set_status(bundle_type: str, swhid: CoreSWHID, status: str) bool [source]#
Set the cooking status of a bundle
- send_notif(bundle_type: str, swhid: CoreSWHID)[source]#
Send all the e-mails in the notification list of a bundle