Mercurial > public > sg101
comparison gpp/core/tasks.py @ 519:f72ace06658a
For #194, rework the who's online and max users functions.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sat, 17 Dec 2011 19:29:24 +0000 |
parents | 5171a5e9353b |
children |
comparison
equal
deleted
inserted
replaced
518:5171a5e9353b | 519:f72ace06658a |
---|---|
2 Celery tasks for the core application. | 2 Celery tasks for the core application. |
3 | 3 |
4 """ | 4 """ |
5 from celery.task import task | 5 from celery.task import task |
6 import django.core.mail | 6 import django.core.mail |
7 | |
8 import core.whos_online | |
7 | 9 |
8 | 10 |
9 @task | 11 @task |
10 def add(x, y): | 12 def add(x, y): |
11 """ | 13 """ |
45 | 47 |
46 # Execute our forum cleanup command to delete old last visit records. | 48 # Execute our forum cleanup command to delete old last visit records. |
47 | 49 |
48 command = ForumCleanup() | 50 command = ForumCleanup() |
49 command.execute() | 51 command.execute() |
52 | |
53 | |
54 @task | |
55 def max_users(): | |
56 """ | |
57 Run the periodic task to calculate the who's online max users/visitors | |
58 statistics. | |
59 | |
60 """ | |
61 core.whos_online.max_users() |