Skip to content

Commit

Permalink
make fix
Browse files Browse the repository at this point in the history
  • Loading branch information
owocki committed Sep 23, 2020
1 parent abb79cd commit 639e903
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions app/marketing/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__']
Expand Down
3 changes: 1 addition & 2 deletions app/marketing/management/commands/new_bounties_email.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down
2 changes: 1 addition & 1 deletion app/marketing/management/commands/roundup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
5 changes: 3 additions & 2 deletions app/marketing/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__)

Expand Down Expand Up @@ -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)
#time.sleep(THROTTLE_S)

1 comment on commit 639e903

@owocki
Copy link
Contributor Author

@owocki owocki commented on 639e903 Sep 24, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorrry.. and thx for the fix

Please sign in to comment.