mirror of
https://github.com/zulip/zulip.git
synced 2025-11-09 16:37:23 +00:00
delete_realm: Optimize attachment cleanup by batching.
This commit is contained in:
committed by
Tim Abbott
parent
cdda4bc089
commit
c9d1755a12
@@ -2,7 +2,7 @@ import io
|
||||
import os
|
||||
import re
|
||||
import unicodedata
|
||||
from typing import IO, Any, Callable, Optional, Tuple
|
||||
from typing import IO, Any, Callable, List, Optional, Tuple
|
||||
|
||||
from django.utils.translation import gettext as _
|
||||
from markupsafe import Markup
|
||||
@@ -206,6 +206,10 @@ class ZulipUploadBackend:
|
||||
def delete_message_attachment(self, path_id: str) -> bool:
|
||||
raise NotImplementedError
|
||||
|
||||
def delete_message_attachments(self, path_ids: List[str]) -> None:
|
||||
for path_id in path_ids:
|
||||
self.delete_message_attachment(path_id)
|
||||
|
||||
# Avatar image uploads
|
||||
def get_avatar_url(self, hash_key: str, medium: bool = False) -> str:
|
||||
raise NotImplementedError
|
||||
|
||||
Reference in New Issue
Block a user