From d47d22a9bb759b4a9f777a21fd8c5e1588546d4c Mon Sep 17 00:00:00 2001 From: "Albert (AJ) St. Aubin" Date: Fri, 22 Mar 2019 12:35:45 -0400 Subject: [PATCH] updating the import for entitlement tasks --- common/djangoapps/entitlements/apps.py | 1 + common/djangoapps/entitlements/tasks.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/common/djangoapps/entitlements/apps.py b/common/djangoapps/entitlements/apps.py index 5e748da974..69325e2b7e 100644 --- a/common/djangoapps/entitlements/apps.py +++ b/common/djangoapps/entitlements/apps.py @@ -18,3 +18,4 @@ class EntitlementsConfig(AppConfig): Connect handlers to signals. """ from . import signals # pylint: disable=unused-variable + from .tasks import expire_old_entitlements diff --git a/common/djangoapps/entitlements/tasks.py b/common/djangoapps/entitlements/tasks.py index bbef3aa757..7a70fa635d 100644 --- a/common/djangoapps/entitlements/tasks.py +++ b/common/djangoapps/entitlements/tasks.py @@ -42,7 +42,7 @@ def expire_old_entitlements(self, start, end, logid='...'): # This query could be optimized to return a more narrow set, but at a # complexity cost. See bug LEARNER-3451 about improving it. - entitlements = CourseEntitlement.objects.filter(expired_at__isnull=True, id__gte=start, id__lt=end) + entitlements = CourseEntitlement.objects.filter(expired_at__isnull=True, id__gte=start, id__lte=end) countdown = 2 ** self.request.retries