email digests: Remove handle_digest_email shim.

The previous commit made it so we only call the
shim in tests, so now we completely remove it.
This commit is contained in:
Steve Howell
2020-11-13 17:27:40 +00:00
committed by Tim Abbott
parent bfa0bdf3d6
commit 1040fb7219
2 changed files with 2 additions and 6 deletions

View File

@@ -371,9 +371,6 @@ def bulk_write_realm_audit_logs(users: List[UserProfile]) -> None:
RealmAuditLog.objects.bulk_create(log_rows)
def handle_digest_email(user_id: int, cutoff: float) -> None:
bulk_handle_digest_email([user_id], cutoff)
def get_modified_streams(user_ids: List[int], cutoff_date: datetime.datetime) -> Dict[int, Set[int]]:
events = [
RealmAuditLog.SUBSCRIPTION_CREATED,

View File

@@ -16,7 +16,6 @@ from zerver.lib.digest import (
gather_new_streams,
get_modified_streams,
get_recent_streams,
handle_digest_email,
)
from zerver.lib.message import get_last_message_id
from zerver.lib.streams import create_stream_if_needed
@@ -67,7 +66,7 @@ class TestDigestEmailMessages(ZulipTestCase):
# To trigger this, we call the one_click_unsubscribe_link function below.
one_click_unsubscribe_link(othello, 'digest')
with queries_captured() as queries:
handle_digest_email(othello.id, cutoff)
bulk_handle_digest_email([othello.id], cutoff)
self.assert_length(queries, 9)
@@ -123,7 +122,7 @@ class TestDigestEmailMessages(ZulipTestCase):
# To trigger this, we call the one_click_unsubscribe_link function below.
one_click_unsubscribe_link(polonius, 'digest')
with queries_captured() as queries:
handle_digest_email(polonius.id, cutoff)
bulk_handle_digest_email([polonius.id], cutoff)
self.assert_length(queries, 9)