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

temp: fix entitlements_to_expire should be capped at entitlements_count #32579

Merged
merged 1 commit into from
Jun 26, 2023

Conversation

pshiu
Copy link
Contributor

@pshiu pshiu commented Jun 26, 2023

Description

On running Celery task expire_and_create_entitlements, for 6 entitlements to expire we get 100 batches:

15:58:48 2023-06-26 15:59:19,674 INFO 20101 [common.djangoapps.entitlements.management.commands.expire_and_create_entitlements] [user None] [ip None] expire_and_create_entitlements.py:86 - Total entitlements that have reached expiration period are 6 
15:58:48 2023-06-26 15:59:19,678 INFO 20101 [common.djangoapps.entitlements.management.commands.expire_and_create_entitlements] [user None] [ip None] expire_and_create_entitlements.py:95 - Found 100 batches. To enqueue entitlement expiration tasks, pass the -c or --commit flags.]

Cap the number of entitlements to expire to the total number of entitlements.

Additional Information

@pshiu pshiu requested a review from zubair-ce07 June 26, 2023 16:08
@pshiu pshiu self-assigned this Jun 26, 2023
Copy link
Contributor

@zubair-ce07 zubair-ce07 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On line 103, we will not need entitlement_count I guess. Can we remove that as well ?

@pshiu pshiu force-pushed the pshiu/zubair-expire_create_entitlements_command branch from 76cc56f to 5bb3fb7 Compare June 26, 2023 16:25
@pshiu pshiu enabled auto-merge (squash) June 26, 2023 16:37
@pshiu pshiu merged commit 8072c3e into master Jun 26, 2023
@pshiu pshiu deleted the pshiu/zubair-expire_create_entitlements_command branch June 26, 2023 16:44
@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production.

@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX production environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants