wrap cache_grade_distribution in unique_constraint_retry
wrap cache_grade_distribution in unique_constraint_retry

closes #CNVS-21275

Change-Id: I973f9b1220bb3d5b32d714da73a11e9faf8f2c6e
Reviewed-on: https://gerrit.instructure.com/57596
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <b3f594e10a9edcf5413cf1190121d45078c62290@instructure.com>
Product-Review: James Williams  <3a5f4ed991dbfa5c9ef76ad729d240ca12f62180@instructure.com>
QA-Review: James Williams  <3a5f4ed991dbfa5c9ef76ad729d240ca12f62180@instructure.com>

SwinburneOnline/canvas-analytics,beyond-z/analytics,whalejasmine/analytics,SwinburneOnline/canvas-analytics,instructure/analytics,beyond-z/analytics,instructure/analytics,whalejasmine/analytics,instructure/analytics,beyond-z/analytics,SwinburneOnline/canvas-analytics