recalculating only the new hanchans shoud do the trick now.
the racalc cronjob reports erronous partly recalculations now. A lot of code cleanups
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
from django.core.cache import cache
|
||||
|
||||
from mahjong_ranking import models
|
||||
from . import logger, MIN_HANCHANS_FOR_LADDER
|
||||
from . import LOGGER, MIN_HANCHANS_FOR_LADDER
|
||||
|
||||
|
||||
class DenormalizationUpdateMiddleware(object): # Ignore PyLintBear (R0903)
|
||||
@@ -57,7 +57,7 @@ class DenormalizationUpdateMiddleware(object): # Ignore PyLintBear (R0903)
|
||||
ranking.save(force_update=True)
|
||||
|
||||
for season in season_queue:
|
||||
logger.info(u'Recalculate placements for Season %d', season)
|
||||
LOGGER.info(u'Recalculate placements for Season %d', season)
|
||||
season_rankings = models.SeasonRanking.objects.filter(
|
||||
season=season, hanchan_count__gt=MIN_HANCHANS_FOR_LADDER
|
||||
).order_by('avg_placement', '-avg_score')
|
||||
|
||||
Reference in New Issue
Block a user