NewsBlur-viq/apps/statistics/tasks.py

18 lines
452 B
Python
Raw Normal View History

2020-11-13 12:14:37 -05:00
from celery.task import task
2012-12-10 13:33:37 -08:00
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
2020-11-13 12:14:37 -05:00
@task(name='collect-stats')
def CollectStats():
logging.debug(" ---> ~FBCollecting stats...")
MStatistics.collect_statistics()
2012-12-10 13:33:37 -08:00
2020-11-13 12:14:37 -05:00
@task(name='collect-feedback')
def CollectFeedback():
logging.debug(" ---> ~FBCollecting feedback...")
MFeedback.collect_feedback()