NewsBlur/apps/statistics/tasks.py
2012-12-24 20:32:08 -08:00

21 lines
No EOL
535 B
Python

from celery.task import Task
from apps.statistics.models import MStatistics
from apps.statistics.models import MFeedback
from utils import log as logging
class CollectStats(Task):
name = 'collect-stats'
def run(self, **kwargs):
logging.debug(" ---> ~FMCollecting stats...")
MStatistics.collect_statistics()
class CollectFeedback(Task):
name = 'collect-feedback'
def run(self, **kwargs):
logging.debug(" ---> ~FMCollecting feedback...")
MFeedback.collect_feedback()