bgneal@239: """
bgneal@239: max_users is a custom manage.py command.
bgneal@239: It is intended to be called from a cron job to calculate the maximum
bgneal@239: number of users online statistic.
bgneal@239: """
bgneal@239: import datetime
bgneal@239: 
bgneal@239: from django.core.management.base import NoArgsCommand
bgneal@239: 
bgneal@519: from core.whos_online import max_users
bgneal@239: 
bgneal@239: 
bgneal@239: class Command(NoArgsCommand):
bgneal@239:     help = "Run periodically to compute the max users online statistic."
bgneal@239: 
bgneal@239:     def handle_noargs(self, **options):
bgneal@519:         max_users()