Mercurial > public > sg101
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gpp/messages/tasks.py Fri Dec 16 01:17:35 2011 +0000 @@ -0,0 +1,17 @@ +""" +Celery tasks for the messages application. + +""" +from celery.task import task + + +@task +def purge_messages(): + """ + Task to purge messages that have been deleted by both sender & receiver. + + """ + from messages.management.commands.purge_messages import Command + + command = Command() + command.execute()