NewsBlur/apps/statistics/tasks.py
2020-11-13 13:26:25 -05:00

17 lines
466 B
Python

from newsblur.celeryapp import app
from apps.statistics.models import MStatistics
from apps.statistics.models import MFeedback
# from utils import log as logging
@app.task(name='collect-stats')
def CollectStats():
logging.debug(" ---> ~FBCollecting stats...")
MStatistics.collect_statistics()
@app.task(name='collect-feedback')
def CollectFeedback():
logging.debug(" ---> ~FBCollecting feedback...")
MFeedback.collect_feedback()