Mercurial > public > sg101
view forums/tasks.py @ 964:51a2051588f5
Image uploading now expects a file.
Refactor image uploading to not expect a Django UploadedFile and use a regular
file instead. This will be needed for the future feature of being able to save
and upload images from the Internet.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Wed, 02 Sep 2015 20:50:08 -0500 |
parents | aeafbf3ecebf |
children |
line wrap: on
line source
""" Celery tasks for the forums application. """ from __future__ import absolute_import from celery import shared_task import forums.latest @shared_task def new_post_task(post_id): """ This task performs new post processing on a Celery task. """ forums.latest.process_new_post(post_id) @shared_task def updated_post_task(post_id): """ This task performs updated post processing on a Celery task. """ forums.latest.process_updated_post(post_id) @shared_task def new_topic_task(topic_id): """ This task performs new topic processing on a Celery task. """ forums.latest.process_new_topic(topic_id) @shared_task def updated_topic_task(topic_id): """ This task performs updated topic processing on a Celery task. """ forums.latest.process_updated_topic(topic_id)