Mercurial > public > sg101
annotate messages/tasks.py @ 581:ee87ea74d46b
For Django 1.4, rearranged project structure for new manage.py.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sat, 05 May 2012 17:10:48 -0500 |
parents | gpp/messages/tasks.py@5171a5e9353b |
children | aeafbf3ecebf |
rev | line source |
---|---|
bgneal@518 | 1 """ |
bgneal@518 | 2 Celery tasks for the messages application. |
bgneal@518 | 3 |
bgneal@518 | 4 """ |
bgneal@518 | 5 from celery.task import task |
bgneal@518 | 6 |
bgneal@518 | 7 |
bgneal@518 | 8 @task |
bgneal@518 | 9 def purge_messages(): |
bgneal@518 | 10 """ |
bgneal@518 | 11 Task to purge messages that have been deleted by both sender & receiver. |
bgneal@518 | 12 |
bgneal@518 | 13 """ |
bgneal@518 | 14 from messages.management.commands.purge_messages import Command |
bgneal@518 | 15 |
bgneal@518 | 16 command = Command() |
bgneal@518 | 17 command.execute() |