File tree Expand file tree Collapse file tree
packages/graphql/src/services Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3277,6 +3277,7 @@ export const handleAssessmentLiveQuizBlockClosureAggregation: HatchetHandlers['h
32773277 )
32783278 return true
32793279 }
3280+
32803281 if ( quiz . blocks . length === 0 ) {
32813282 executionCtx . logger . error ( `Quiz with ID ${ liveQuizId } has no blocks` )
32823283 return false
@@ -3291,6 +3292,7 @@ export const handleAssessmentLiveQuizBlockClosureAggregation: HatchetHandlers['h
32913292 )
32923293 return false
32933294 }
3295+
32943296 if ( block . elements . length === 0 ) {
32953297 executionCtx . logger . error (
32963298 `Block with ID ${ blockId } in quiz with ID ${ liveQuizId } has no elements`
@@ -3302,6 +3304,22 @@ export const handleAssessmentLiveQuizBlockClosureAggregation: HatchetHandlers['h
33023304 executionCtx . logger . info (
33033305 `No responses found for any element in block with ID ${ blockId } in quiz with ID ${ liveQuizId } `
33043306 )
3307+
3308+ try {
3309+ // remove all cache entries related to this block only (or the entire live quiz, if this was the last block)
3310+ await removeCacheEntriesBlock ( {
3311+ liveQuizId,
3312+ blockId,
3313+ block,
3314+ isLastBlock,
3315+ redis : globalCtx . redisAssessmentExec ,
3316+ } )
3317+ } catch ( error ) {
3318+ executionCtx . logger . error (
3319+ `Error removing cache entries for block with ID ${ blockId } in quiz with ID ${ liveQuizId } : ${ error } `
3320+ )
3321+ }
3322+
33053323 return true
33063324 }
33073325
You can’t perform that action at this time.
0 commit comments