Stream-Framework icon indicating copy to clipboard operation
Stream-Framework copied to clipboard

Celery cannot pick up registered verbs in Pyramid app

Open viirak opened this issue 11 years ago • 6 comments

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.

viirak avatar Aug 05 '14 05:08 viirak

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

@tbarbugli : Can you please help ?

anunayasri avatar Jan 06 '16 12:01 anunayasri

Hi, it's been solved. Thank you.

On Wed, Jan 6, 2016 at 7:00 PM, Anunaya Srivastava <[email protected]

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 .

viirak avatar Jan 07 '16 01:01 viirak

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

anunayasri avatar Jan 07 '16 06:01 anunayasri

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

anunayasri avatar Jan 11 '16 08:01 anunayasri

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 < [email protected]> 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 .

viirak avatar Jan 12 '16 11:01 viirak

@anunayasri Have you been able to solve this issue?

ghost avatar Mar 11 '17 06:03 ghost