buildactivepostersranking.py 499 B

1234567891011121314151617
  1. from time import time
  2. from django.core.management.base import BaseCommand
  3. from misago.users.activepostersranking import build_active_posters_ranking
  4. class Command(BaseCommand):
  5. help = 'Builds active posters ranking'
  6. def handle(self, *args, **options):
  7. self.stdout.write("\nBuilding active posters ranking...")
  8. start_time = time()
  9. build_active_posters_ranking()
  10. end_time = time() - start_time
  11. self.stdout.write("Finished after %.2fs" % end_time)