def _generate_report(now: datetime.date) -> None: # Shuffle so in case of draw for usage of the day it's not always the same long_phrases: List[LongPhrase] = random.sample( LongPhrase.refresh_cache(), len(LongPhrase.get_phrases())) short_phrases: List[Phrase] = random.sample(Phrase.refresh_cache(), len(Phrase.get_phrases())) users = User.load_all(ignore_gdpr=True) chapas = ScheduledTask.get_tasks(type='chapa') inline_users = InlineUser.get_all() Report.generate(long_phrases, short_phrases, users, inline_users, chapas, now) Phrase.remove_daily_usages() LongPhrase.remove_daily_usages()
def generate_report(self): print("\n") Print.success("Generating Report") report = Report(self, self.exp_reports) report.generate()