mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 14:03:30 +00:00
models: Replace ScheduledJob with ScheduledEmail.
ScheduledJob was written for much more generality than it ended up being used for. Currently it is used by send_future_email, and nothing else. Tailoring the model to emails in particular will make it easier to do things like selectively clear emails when people unsubscribe from particular email types, or seamlessly handle using the same email on multiple realms.
This commit is contained in:
@@ -209,7 +209,7 @@ def handle_digest_email(user_profile_id, cutoff):
|
||||
if enough_traffic(context["unread_pms"], context["hot_conversations"],
|
||||
new_streams_count, new_users_count):
|
||||
logger.info("Sending digest email for %s" % (user_profile.email,))
|
||||
# Send now, as a ScheduledJob
|
||||
# Send now, as a ScheduledEmail
|
||||
send_future_email('zerver/emails/digest', to_user_id=user_profile.id,
|
||||
from_name="Zulip Digest", from_address=FromAddress.NOREPLY,
|
||||
context=context)
|
||||
|
||||
Reference in New Issue
Block a user