comparison core/whos_online.py @ 599:2f5779e9d8f8

Fix max users stat not updating.
author Brian Neal <bgneal@gmail.com>
date Wed, 04 Jul 2012 00:14:00 -0500
parents ee87ea74d46b
children
comparison
equal deleted inserted replaced
598:2e429e2b7bb6 599:2f5779e9d8f8
202 logger.error(e) 202 logger.error(e)
203 203
204 if stats: 204 if stats:
205 return Statistic( 205 return Statistic(
206 id=1, 206 id=1,
207 max_users=stats['max_users'], 207 max_users=int(stats['max_users']),
208 max_users_date=datetime.datetime.fromtimestamp( 208 max_users_date=datetime.datetime.fromtimestamp(
209 float(stats['max_users_date'])), 209 float(stats['max_users_date'])),
210 max_anon_users=stats['max_anon_users'], 210 max_anon_users=int(stats['max_anon_users']),
211 max_anon_users_date=datetime.datetime.fromtimestamp( 211 max_anon_users_date=datetime.datetime.fromtimestamp(
212 float(stats['max_anon_users_date']))) 212 float(stats['max_anon_users_date'])))
213 213
214 try: 214 try:
215 stats = Statistic.objects.get(pk=1) 215 stats = Statistic.objects.get(pk=1)