diff --git a/app/marketing/admin.py b/app/marketing/admin.py index 74c74757409..a4b622bd21d 100644 --- a/app/marketing/admin.py +++ b/app/marketing/admin.py @@ -26,6 +26,8 @@ GithubOrgToTwitterHandleMapping, Job, Keyword, LeaderboardRank, ManualStat, MarketingCallback, Match, RoundupEmail, SlackPresence, SlackUser, Stat, UpcomingDate, ) + + class RoundupEmailAdmin(admin.ModelAdmin): ordering = ['-id'] list_display = ['created_on', '__str__'] diff --git a/app/marketing/management/commands/new_bounties_email.py b/app/marketing/management/commands/new_bounties_email.py index a4b0eb58900..c42a95ddc24 100644 --- a/app/marketing/management/commands/new_bounties_email.py +++ b/app/marketing/management/commands/new_bounties_email.py @@ -23,11 +23,10 @@ from django.core.management.base import BaseCommand from django.utils import timezone -from marketing.tasks import new_bounty_daily from marketing.models import EmailSubscriber +from marketing.tasks import new_bounty_daily from marketing.utils import should_suppress_notification_email from townsquare.utils import is_email_townsquare_enabled -import time warnings.filterwarnings("ignore") diff --git a/app/marketing/management/commands/roundup.py b/app/marketing/management/commands/roundup.py index dd5bf6fb38a..41df2c0b5b9 100644 --- a/app/marketing/management/commands/roundup.py +++ b/app/marketing/management/commands/roundup.py @@ -20,8 +20,8 @@ from django.core.management.base import BaseCommand -from marketing.tasks import weekly_roundup from marketing.models import EmailSubscriber +from marketing.tasks import weekly_roundup warnings.filterwarnings("ignore", category=DeprecationWarning) diff --git a/app/marketing/tasks.py b/app/marketing/tasks.py index 0b22c1d7af0..f13b016dd2e 100644 --- a/app/marketing/tasks.py +++ b/app/marketing/tasks.py @@ -4,8 +4,9 @@ from app.services import RedisService from celery import app, group from celery.utils.log import get_task_logger +from marketing.mails import new_bounty_daily as new_bounty_daily_email +from marketing.mails import weekly_roundup as weekly_roundup_email from marketing.models import EmailSubscriber -from marketing.mails import new_bounty_daily as new_bounty_daily_email, weekly_roundup as weekly_roundup_email logger = get_task_logger(__name__) @@ -46,4 +47,4 @@ def send_all_weekly_roundup(self, retry: bool = True) -> None: email_list = list(set(queryset.values_list('email', flat=True))) for to_email in email_list: weekly_roundup.delay(to_email) - #time.sleep(THROTTLE_S) \ No newline at end of file + #time.sleep(THROTTLE_S)