Mercurial > public > sg101
comparison accounts/tasks.py @ 750:aeafbf3ecebf
For #63, upgrade to celery 3.1.7.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Tue, 31 Dec 2013 16:36:22 -0600 |
parents | ee87ea74d46b |
children |
comparison
equal
deleted
inserted
replaced
749:b6e98717690b | 750:aeafbf3ecebf |
---|---|
1 """ | 1 """ |
2 Celery tasks for the accounts application. | 2 Celery tasks for the accounts application. |
3 | 3 |
4 """ | 4 """ |
5 from celery.task import task | 5 from __future__ import absolute_import |
6 | |
7 from celery import shared_task | |
6 | 8 |
7 from accounts.stats import update_user_stats | 9 from accounts.stats import update_user_stats |
8 | 10 |
9 | 11 |
10 @task | 12 @shared_task |
11 def user_stats_task(user_id): | 13 def user_stats_task(user_id): |
12 """ | 14 """ |
13 Run the update_user_stats() function on a new task. | 15 Run the update_user_stats() function on a new task. |
14 | 16 |
15 """ | 17 """ |