edx-enterprise-data 9.2.1__py3-none-any.whl → 9.2.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {edx_enterprise_data-9.2.1.dist-info → edx_enterprise_data-9.2.2.dist-info}/METADATA +1 -1
- {edx_enterprise_data-9.2.1.dist-info → edx_enterprise_data-9.2.2.dist-info}/RECORD +7 -7
- enterprise_data/__init__.py +1 -1
- enterprise_data/api/v1/views/enterprise_learner.py +2 -19
- {edx_enterprise_data-9.2.1.dist-info → edx_enterprise_data-9.2.2.dist-info}/LICENSE +0 -0
- {edx_enterprise_data-9.2.1.dist-info → edx_enterprise_data-9.2.2.dist-info}/WHEEL +0 -0
- {edx_enterprise_data-9.2.1.dist-info → edx_enterprise_data-9.2.2.dist-info}/top_level.txt +0 -0
@@ -1,4 +1,4 @@
|
|
1
|
-
enterprise_data/__init__.py,sha256=
|
1
|
+
enterprise_data/__init__.py,sha256=QCEGIN__8CekKBhenmr76FcSSUvF-sR5uTrPNZQj8Q4,123
|
2
2
|
enterprise_data/apps.py,sha256=aF6hZwDfI2oWj95tUTm_2ikHueQj-jLj-u0GrgzpsQI,414
|
3
3
|
enterprise_data/clients.py,sha256=GvQupy5TVYfO_IKC3yzXSAgNP54r-PtIjidM5ws9Iks,3947
|
4
4
|
enterprise_data/constants.py,sha256=uCKjfpdlMYFZJsAj3n9RMw4Cmg5_6s3NuwocO-fch3s,238
|
@@ -39,7 +39,7 @@ enterprise_data/api/v1/views/analytics_enrollments.py,sha256=HXgoFwvXk-CZcf6qbVO
|
|
39
39
|
enterprise_data/api/v1/views/analytics_leaderboard.py,sha256=zwd-2A2sctjAdx5BUjCqiwcZ5aNvM8wfm386pR-RwGQ,4114
|
40
40
|
enterprise_data/api/v1/views/base.py,sha256=Kkmd5zgEBAhvwS_GoGXSK6lgbDNwSPioYn-QbnizI3w,3416
|
41
41
|
enterprise_data/api/v1/views/enterprise_admin.py,sha256=DsR1oHFhe6LCIFjIJ4YLLZ7PUChvNlFfdZD-sxHoijY,7388
|
42
|
-
enterprise_data/api/v1/views/enterprise_learner.py,sha256=
|
42
|
+
enterprise_data/api/v1/views/enterprise_learner.py,sha256=HemAL1ndJT7crK2_A81o6ozvrNscNxLFPSRm3D0lDbo,18188
|
43
43
|
enterprise_data/api/v1/views/enterprise_offers.py,sha256=VifxgqTLFLVw4extYPlHcN1N_yjXcsYsAlYEnAbpb10,1266
|
44
44
|
enterprise_data/fixtures/enterprise_enrollment.json,sha256=6onPXXR29pMdTdbl_mn81sDi3Re5jkLUZz2TPMB_1IY,5786
|
45
45
|
enterprise_data/fixtures/enterprise_user.json,sha256=6g8GvNY9j_fh1dvAU80bTAMI2F5vXCkb8a4UjsftMvQ,1970
|
@@ -167,8 +167,8 @@ enterprise_reporting/tests/test_send_enterprise_reports.py,sha256=WtL-RqGgu2x5PP
|
|
167
167
|
enterprise_reporting/tests/test_utils.py,sha256=Zt_TA0LVb-B6fQGkUkAKKVlUKKnQh8jnw1US1jKe7g8,9493
|
168
168
|
enterprise_reporting/tests/test_vertica_client.py,sha256=-R2yNCGUjRtoXwLMBloVFQkFYrJoo613VCr61gwI3kQ,140
|
169
169
|
enterprise_reporting/tests/utils.py,sha256=xms2LM7DV3wczXEfctOK1ddel1EE0J_YSr17UzbCDy4,1401
|
170
|
-
edx_enterprise_data-9.2.
|
171
|
-
edx_enterprise_data-9.2.
|
172
|
-
edx_enterprise_data-9.2.
|
173
|
-
edx_enterprise_data-9.2.
|
174
|
-
edx_enterprise_data-9.2.
|
170
|
+
edx_enterprise_data-9.2.2.dist-info/LICENSE,sha256=dql8h4yceoMhuzlcK0TT_i-NgTFNIZsgE47Q4t3dUYI,34520
|
171
|
+
edx_enterprise_data-9.2.2.dist-info/METADATA,sha256=TojFGOiyemYxgwoe9onic1iSE_Nc-JMGx6XOe9vUEfU,1569
|
172
|
+
edx_enterprise_data-9.2.2.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
|
173
|
+
edx_enterprise_data-9.2.2.dist-info/top_level.txt,sha256=f5F2kU-dob6MqiHJpgZkFzoCD5VMhsdpkTV5n9Tvq3I,59
|
174
|
+
edx_enterprise_data-9.2.2.dist-info/RECORD,,
|
enterprise_data/__init__.py
CHANGED
@@ -6,7 +6,6 @@ from datetime import date, timedelta
|
|
6
6
|
from logging import getLogger
|
7
7
|
from uuid import UUID
|
8
8
|
|
9
|
-
from edx_django_utils.cache import TieredCache
|
10
9
|
from rest_framework import filters, viewsets
|
11
10
|
from rest_framework.decorators import action
|
12
11
|
from rest_framework.response import Response
|
@@ -25,7 +24,7 @@ from enterprise_data.filters import AuditEnrollmentsFilterBackend, AuditUsersEnr
|
|
25
24
|
from enterprise_data.models import EnterpriseLearner, EnterpriseLearnerEnrollment
|
26
25
|
from enterprise_data.paginators import EnterpriseEnrollmentsPagination
|
27
26
|
from enterprise_data.renderers import EnrollmentsCSVRenderer
|
28
|
-
from enterprise_data.utils import
|
27
|
+
from enterprise_data.utils import subtract_one_month
|
29
28
|
|
30
29
|
from .base import EnterpriseViewSetMixin
|
31
30
|
|
@@ -83,23 +82,7 @@ class EnterpriseLearnerEnrollmentViewSet(EnterpriseViewSetMixin, viewsets.ReadOn
|
|
83
82
|
|
84
83
|
enterprise_customer_uuid = self.kwargs['enterprise_id']
|
85
84
|
|
86
|
-
# TODO: Created a ticket ENT0-9531 to
|
87
|
-
# Temporary logging to test cache issue
|
88
|
-
try:
|
89
|
-
LOGGER.info("Trying to get Learner Enrollment data from Cache")
|
90
|
-
cache_key = get_cache_key(
|
91
|
-
resource='enterprise-learner',
|
92
|
-
enterprise_customer=enterprise_customer_uuid,
|
93
|
-
)
|
94
|
-
cached_response = TieredCache.get_cached_response(cache_key)
|
95
|
-
if cached_response.is_found:
|
96
|
-
LOGGER.info("Learner Enrollment data found in Cache for Enterprise: [%s]", enterprise_customer_uuid)
|
97
|
-
else:
|
98
|
-
LOGGER.info("Learner Enrollment data not found in Cache for Enterprise: [%s]", enterprise_customer_uuid)
|
99
|
-
TieredCache.set_all_tiers(cache_key, 'dummy_enrollments', DEFAULT_LEARNER_CACHE_TIMEOUT)
|
100
|
-
LOGGER.info("Cache set for Enterprise: [%s] whose key is: [%s]", enterprise_customer_uuid, cache_key)
|
101
|
-
except Exception as e:
|
102
|
-
LOGGER.error("Memcached connection test failed: %s", e)
|
85
|
+
# TODO: Created a ticket ENT0-9531 to add the cache on this viewset
|
103
86
|
|
104
87
|
enrollments = EnterpriseLearnerEnrollment.objects.filter(enterprise_customer_uuid=enterprise_customer_uuid)
|
105
88
|
enrollments = self.apply_filters(enrollments)
|
File without changes
|
File without changes
|
File without changes
|