exp: Add logging to course cert availability date

I believe there to be a race condition here that only manifests in a
non-devstack environment. Adding some logging to better diagnose.
This commit is contained in:
Matt Tuchfarber
2021-03-10 17:01:45 -05:00
parent 5557194af1
commit 09bb25bbcd
2 changed files with 10 additions and 0 deletions

View File

@@ -372,6 +372,10 @@ def award_course_certificate(self, username, course_run_key):
# This is a known limitation of this implementation and was chosen to reduce the amount of replication,
# endpoints, celery tasks, and jenkins jobs that needed to be written for this functionality
visible_date = available_date_for_certificate(course_overview, certificate)
LOGGER.info(
"Task award_course_certificate will award certificate for course "
f"{course_key} with a visible date of {visible_date}"
)
post_course_certificate(credentials_client, username, certificate, visible_date)
LOGGER.info(f"Awarded certificate for course {course_key} to user {username}")