Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

progress indicator for populate_daily_metrics #228

Merged
merged 1 commit into from
Jun 26, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion figures/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ def populate_daily_metrics(date_for=None, force_update=False):
logger.info('Starting task "figures.populate_daily_metrics" for date "{}"'.format(
date_for))

for site in Site.objects.all():
sites_count = Site.objects.count()
for i, site in enumerate(Site.objects.all()):
for course in figures.sites.get_courses_for_site(site):
try:
populate_single_cdm(
Expand Down Expand Up @@ -131,6 +132,8 @@ def populate_daily_metrics(date_for=None, force_update=False):
site_id=site.id,
date_for=date_for,
force_update=force_update)
logger.info("figures.populate_daily_metrics: finished Site {:04d} of {:04d}".format(
i, sites_count))

logger.info('Finished task "figures.populate_daily_metrics" for date "{}"'.format(
date_for))
Expand Down