From 5ec48d508b0c070b5848909538725244b89f6ee9 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Thu, 10 Dec 2020 12:46:46 +0100 Subject: [PATCH] 0.4 LPO performance update - Fixed enrollment data management command Changed update_figures_enrollment_data Django management command to use the figures.task.update_enrollment_data so it can be run in celery --- .../management/commands/update_figures_enrollment_data.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/figures/management/commands/update_figures_enrollment_data.py b/figures/management/commands/update_figures_enrollment_data.py index 38a0801b..e74e574c 100644 --- a/figures/management/commands/update_figures_enrollment_data.py +++ b/figures/management/commands/update_figures_enrollment_data.py @@ -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): @@ -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')