NewsBlur-viq/apps/statistics/tasks.py

21 lines
541 B
Python
Raw Normal View History

2012-12-10 13:33:37 -08:00
from celery.task import Task
from apps.statistics.models import MStatistics
from apps.statistics.models import MFeedback
# from utils import log as logging
2012-12-10 13:33:37 -08:00
class CollectStats(Task):
name = 'collect-stats'
def run(self, **kwargs):
# logging.debug(" ---> ~FBCollecting stats...")
2012-12-10 13:33:37 -08:00
MStatistics.collect_statistics()
class CollectFeedback(Task):
name = 'collect-feedback'
def run(self, **kwargs):
# logging.debug(" ---> ~FBCollecting feedback...")
2012-12-24 20:32:08 -08:00
MFeedback.collect_feedback()