Skip to content

Commit

Permalink
more slave lag avoidance (bug 583367)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeff Balogh committed Aug 2, 2010
1 parent 14f091a commit 3ac9c68
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions apps/reviews/models.py
Expand Up @@ -96,9 +96,9 @@ def post_save(sender, instance, created, **kwargs):
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
Expand Down

0 comments on commit 3ac9c68

Please sign in to comment.