Skip to content

Commit

Permalink
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion care/facility/reports/admin_reports.py
Original file line number Diff line number Diff line change
@@ -22,7 +22,10 @@

@periodic_task(run_every=crontab(minute="0", hour="8"))
def run_scheduled_district_reports():
AdminReports(AdminReportsMode.DISTRICT).generate_reports()
if settings.ENABLE_ADMIN_REPORTS:
AdminReports(AdminReportsMode.DISTRICT).generate_reports()
else:
print("Skipping admin reports as they are disabled")


class InvalidModeException(Exception):
1 change: 1 addition & 0 deletions config/settings/base.py
Original file line number Diff line number Diff line change
@@ -467,6 +467,7 @@ def GETKEY(group, request):

DISABLE_RATELIMIT = False

ENABLE_ADMIN_REPORTS = env.bool("ENABLE_ADMIN_REPORTS", default=False)

# Health Check Config

0 comments on commit 42d725f

Please sign in to comment.