NewsBlur-viq/apps/statistics/tasks.py

18 lines
464 B
Python
Raw Normal View History

2020-11-13 13:26:25 -05:00
from newsblur.celeryapp import app
2012-12-10 13:33:37 -08:00
from apps.statistics.models import MStatistics
from apps.statistics.models import MFeedback
2020-12-05 14:16:17 -05:00
from utils import log as logging
2012-12-10 13:33:37 -08:00
2020-11-13 13:26:25 -05:00
@app.task(name='collect-stats')
2020-11-13 12:14:37 -05:00
def CollectStats():
logging.debug(" ---> ~FBCollecting stats...")
MStatistics.collect_statistics()
2012-12-10 13:33:37 -08:00
2020-11-13 13:26:25 -05:00
@app.task(name='collect-feedback')
2020-11-13 12:14:37 -05:00
def CollectFeedback():
logging.debug(" ---> ~FBCollecting feedback...")
MFeedback.collect_feedback()