Paginator der besser ins Design passt.
This commit is contained in:
@@ -6,6 +6,7 @@ Created on 23.05.2011
|
||||
"""
|
||||
from django.core.cache import cache
|
||||
from django.db import transaction
|
||||
|
||||
from mahjong_ranking import models
|
||||
from . import logger
|
||||
|
||||
@@ -30,7 +31,8 @@ class DenormalizationUpdateMiddleware(object):
|
||||
if len(event_ranking_queue) > 0:
|
||||
while len(event_ranking_queue) > 0:
|
||||
event_id, user_id = event_ranking_queue.pop()
|
||||
logger.info("recalculate %d tournament Ranking in %s", user_id, event_id)
|
||||
logger.info("recalculate %d tournament Ranking in %s", user_id,
|
||||
event_id)
|
||||
ranking = models.EventRanking.objects.get_or_create(
|
||||
event_id=event_id, user_id=user_id)[0]
|
||||
ranking.recalculate()
|
||||
@@ -57,7 +59,8 @@ class DenormalizationUpdateMiddleware(object):
|
||||
user_id=user_id, season_id=season_id)[0]
|
||||
ranking.recalculate()
|
||||
else:
|
||||
logger.error('Season: %i; Benutzer Nr. %i - existiert nicht!', season_id, user_id)
|
||||
logger.error('Season: %i; Benutzer Nr. %i - existiert nicht!',
|
||||
season_id, user_id)
|
||||
cache.set('ladder_ranking_queue', ladder_ranking_queue, 360)
|
||||
transaction.commit()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user