Delay grades recalculation task
As discovered in load testing, if this task is run too quickly it can ask for a newly-recorded score prior to the active transaction finishing and writing to the database. TNL-6424
This commit is contained in:
@@ -191,7 +191,8 @@ def enqueue_subsection_update(sender, **kwargs): # pylint: disable=unused-argum
|
||||
event_transaction_id=unicode(get_event_transaction_id()),
|
||||
event_transaction_type=unicode(get_event_transaction_type()),
|
||||
score_db_table=kwargs['score_db_table'],
|
||||
)
|
||||
),
|
||||
countdown=2,
|
||||
)
|
||||
log.info(
|
||||
u'Grades: Request async calculation of subsection grades with args: {}. Task [{}]'.format(
|
||||
|
||||
Reference in New Issue
Block a user