Refactoring

This commit is contained in:
Samuel Clay 2022-06-22 15:53:13 -04:00
parent c20eed028c
commit d47053d049
2 changed files with 2 additions and 3 deletions

View file

@ -1303,7 +1303,7 @@ class Profile(models.Model):
logging.user(self.user, "~BB~FM~SBSending email for new premium: %s" % self.user.email)
def send_new_premium_archive_email(self, new_story_count, total_story_count, pre_archive_count, force=False):
def send_new_premium_archive_email(self, total_story_count, pre_archive_count, force=False):
if not self.user.email:
return

View file

@ -33,10 +33,9 @@ def FinishFetchArchiveFeeds(results, user_id, start_time, starting_story_count):
# logging.debug(" ---> Fetching archive stories finished for %s" % (user_id))
ending_story_count, pre_archive_count = UserSubscription.finish_fetch_archive_feeds(user_id, start_time, starting_story_count)
new_story_count = ending_story_count - starting_story_count
user_profile = Profile.objects.get(user__pk=user_id)
user_profile.send_new_premium_archive_email(new_story_count, ending_story_count, pre_archive_count)
user_profile.send_new_premium_archive_email(ending_story_count, pre_archive_count)
@app.task(name="email-new-premium-pro")
def EmailNewPremiumPro(user_id):