Mercurial > public > sg101
comparison gpp/messages/tasks.py @ 518:5171a5e9353b
For #194, add a celery task for purging deleted private messages.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Fri, 16 Dec 2011 01:17:35 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
517:666147a2cc08 | 518:5171a5e9353b |
---|---|
1 """ | |
2 Celery tasks for the messages application. | |
3 | |
4 """ | |
5 from celery.task import task | |
6 | |
7 | |
8 @task | |
9 def purge_messages(): | |
10 """ | |
11 Task to purge messages that have been deleted by both sender & receiver. | |
12 | |
13 """ | |
14 from messages.management.commands.purge_messages import Command | |
15 | |
16 command = Command() | |
17 command.execute() |