Skip to content

Commit

Permalink
0.4 LPO performance update - Fixed enrollment data management command
Browse files Browse the repository at this point in the history
Changed update_figures_enrollment_data Django management command to use
the figures.task.update_enrollment_data so it can be run in celery
  • Loading branch information
johnbaldwin committed Dec 10, 2020
1 parent fb90299 commit 5ec48d5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions figures/management/commands/update_figures_enrollment_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from textwrap import dedent
from django.contrib.sites.models import Site
from django.core.management.base import BaseCommand
from figures.backfill import backfill_enrollment_data_for_site
from figures.tasks import update_enrollment_data


def get_site(identifier):
Expand Down Expand Up @@ -52,8 +52,8 @@ def handle(self, *args, **options):
for site in sites:
print('Updating EnrollmentData for site "{}"'.format(site.domain))
if options['no_delay']:
backfill_enrollment_data_for_site(site)
update_enrollment_data(site)
else:
backfill_enrollment_data_for_site(site).delay()
update_enrollment_data.delay(site=site) # pragma: no cover

print('DONE: Update Figures EnrollmentData')

0 comments on commit 5ec48d5

Please sign in to comment.