tschellenbach / Stream-Framework

Stream Framework is a Python library, which allows you to build news feed, activity streams and notification systems using Cassandra and/or Redis. The authors of Stream-Framework also provide a cloud service for feed technology:
https://getstream.io/
Other
4.73k stars 541 forks source link

Celery cannot pick up registered verbs in Pyramid app #68

Open viirak opened 10 years ago

viirak commented 10 years ago

I have a pyramid application. I registered verbs in main init.py but it does not work when celery tasks run. Where should I registered verbs in Pyramid application so that Celery tasks can pick it up?

Celery: raised unexpected: KeyError(5,) return get_verb_storage()[verb_id] KeyError: 5

Thank you.

anunayasri commented 8 years ago

Hi @viirak. Were you able to solve this issue ?

@tbarbugli : Can you please help ?

viirak commented 8 years ago

Hi, it's been solved. Thank you.

On Wed, Jan 6, 2016 at 7:00 PM, Anunaya Srivastava <notifications@github.com

wrote:

Hi @viirak https://github.com/viirak. Were you able to solve this issue ?

@tbarbugli https://github.com/tbarbugli : Can you please help ?

— Reply to this email directly or view it on GitHub https://github.com/tschellenbach/Stream-Framework/issues/68#issuecomment-169308240 .

anunayasri commented 8 years ago

@viirak : Actually, I am stuck at the same issue. It would be great if you could tell me how you solved it.

anunayasri commented 8 years ago

@viirak @tbarbugli Guys, can you help me out ? How did you solve this issue ?

viirak commented 8 years ago

Hi, it's been long time i did that. Checking my code again I see that I have this setup

in feed_verbs.py

from stream_framework import verbs from stream_framework.verbs.base import Verb

verb id continue from stream_framework.verbs.base

class VerbPost(Verb): id=5 infinitive='post' past_tense='posted'

verbs.register(VerbPost)

Then in views.py code create activity object

activity = Activity( actor=self.user.id, verb=feed_verbs.VerbPost, object=new_post.id, time=datetime.datetime.utcnow() )

Hope this help.

viirak

On Mon, Jan 11, 2016 at 3:41 PM, Anunaya Srivastava < notifications@github.com> wrote:

@viirak https://github.com/viirak @tbarbugli https://github.com/tbarbugli Guys, can you help me out ? How did you solve this issue ?

— Reply to this email directly or view it on GitHub https://github.com/tschellenbach/Stream-Framework/issues/68#issuecomment-170468017 .

ghost commented 7 years ago

@anunayasri Have you been able to solve this issue?