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

Local media retention doesn't delete from DB #16988

Open
erikjohnston opened this issue Mar 8, 2024 · 2 comments
Open

Local media retention doesn't delete from DB #16988

erikjohnston opened this issue Mar 8, 2024 · 2 comments

Comments

@erikjohnston
Copy link
Member

For media_retention.local_media_lifetime we call:

await self.store.delete_remote_media(self.server_name, media_id)

which is wrong

@dklimpel
Copy link
Contributor

Local media IDs will deleted:

await self.store.delete_url_cache_media((media_id,))

async def delete_url_cache_media(self, media_ids: Collection[str]) -> None:
if len(media_ids) == 0:
return
def _delete_url_cache_media_txn(txn: LoggingTransaction) -> None:
sql = "DELETE FROM local_media_repository WHERE media_id = ?"

But it's really not ideal.

@erikjohnston
Copy link
Member Author

Oooh, good spot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants