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:
Eric Fischer
2017-01-30 10:50:56 -05:00
parent f308537818
commit a78db97d26

View File

@@ -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(