NewsBlur/apps/analyzer/tasks.py

14 lines
364 B
Python
Raw Normal View History

2017-01-05 18:26:50 -08:00
from celery.task import Task
from utils import log as logging
class EmailPopularityQuery(Task):
def run(self, pk):
from apps.analyzer.models import MPopularityQuery
query = MPopularityQuery.objects.get(pk=pk)
2017-01-05 18:29:28 -08:00
logging.debug(" -> ~BB~FCRunning popularity query: ~SB%s" % query)
2017-01-05 18:26:50 -08:00
query.send_email()