more slave lag avoidance (bug 583367)

This commit is contained in:
Jeff Balogh 2010-08-02 11:37:42 -07:00
Родитель 14f091a56c
Коммит 3ac9c6844b
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -96,9 +96,9 @@ class Review(amo.models.ModelBase):
def post_delete(sender, instance, **kwargs):
from . import tasks
pair = instance.addon_id, instance.user_id
# Do this immediately so is_latest is correct.
tasks.update_denorm(pair)
# Use default so we don't hit slave lag.
# Do this immediately so is_latest is correct. Use default to avoid
# slave lag.
tasks.update_denorm(pair, using='default')
tasks.addon_review_aggregates.delay(instance.addon_id, using='default')
@staticmethod