diff --git a/hc/api/management/commands/sendreports.py b/hc/api/management/commands/sendreports.py index fd54ae81..71e48e90 100644 --- a/hc/api/management/commands/sendreports.py +++ b/hc/api/management/commands/sendreports.py @@ -29,7 +29,7 @@ class Command(BaseCommand): help="Keep running indefinitely in a 300 second wait loop", ) - def handle_one_monthly_report(self): + def handle_one_report(self): report_due = Q(next_report_date__lt=timezone.now()) report_not_scheduled = Q(next_report_date__isnull=True) @@ -94,7 +94,7 @@ class Command(BaseCommand): self.stdout.write("sendreports is now running") while True: # Monthly reports - while self.handle_one_monthly_report(): + while self.handle_one_report(): pass # Daily and hourly nags diff --git a/hc/api/tests/test_sendreports.py b/hc/api/tests/test_sendreports.py index d06821bc..e790dfc1 100644 --- a/hc/api/tests/test_sendreports.py +++ b/hc/api/tests/test_sendreports.py @@ -37,7 +37,7 @@ class SendReportsTestCase(BaseTestCase): cmd = Command(stdout=Mock()) cmd.pause = Mock() # don't pause for 1s - found = cmd.handle_one_monthly_report() + found = cmd.handle_one_report() self.assertTrue(found) self.profile.refresh_from_db() @@ -53,14 +53,14 @@ class SendReportsTestCase(BaseTestCase): self.profile.next_report_date = now() + td(days=1) self.profile.save() - found = Command().handle_one_monthly_report() + found = Command().handle_one_report() self.assertFalse(found) def test_it_fills_blank_next_report_date(self): self.profile.next_report_date = None self.profile.save() - found = Command().handle_one_monthly_report() + found = Command().handle_one_report() self.assertTrue(found) self.profile.refresh_from_db() @@ -72,13 +72,13 @@ class SendReportsTestCase(BaseTestCase): self.profile.reports = "off" self.profile.save() - found = Command().handle_one_monthly_report() + found = Command().handle_one_report() self.assertFalse(found) def test_it_requires_pinged_checks(self): self.check.delete() - found = Command().handle_one_monthly_report() + found = Command().handle_one_report() self.assertTrue(found) # No email should have been sent: diff --git a/templates/accounts/notifications.html b/templates/accounts/notifications.html index e41ec4db..92dd11ce 100644 --- a/templates/accounts/notifications.html +++ b/templates/accounts/notifications.html @@ -33,7 +33,7 @@ -
Send me periodic email reports:
+Periodic email reports:
If any checks are down:
+Ongoing reminders if any checks are down: