view counter is no more updated (celery task not executed)
I've set up my own askbot server
it's based on the master's branch, since some days (without git pull between) my number of view are not updating
And to be honest, being not very confident with django code, I don't know where to beging to debug the code and know from where the problem is coming. If someone can give me even some little hint that would be greatly appreciated.
Edit: I've debugged the code and I've arrived to the conclusion that for some reason in the file askbot/views/readers.py
tasks.record_question_visit.delay(
question_post = question_post,
user_id = request.user.id,
update_view_count = update_view_count
)
the method record_question_visit is never called (I've put some debug around and inside this method, so this line is executed, but it seems the task is delayed and never executed
because if I "hack" the code like this
#TODO MYHACK
question_post.thread.increase_view_count()
tasks.record_question_visit.delay(
question_post = question_post,
user_id = request.user.id,
update_view_count = update_view_count
)
The views are correctly updated
Comments
What is your
CELERY_ALWAYS_EAGER
setting? Are you running a celery daemon?I'm guessing that this may be related: http://askbot.org/en/question/9628/thread-matching-query-does-not-exist-when-posting/#9630 . Please always specify version of askbot, that will make it easier to help.