On Fri, Feb 6, 2009 at 7:44 AM, John Mettraux <[email protected]> wrote:

>
> Hi Kenneth, hi list,


Top of the morning everyone

I was writing a bit of documentation for the JabberListener you wrote
> (thanks again) and I was thinking that the current listener
> initialization scheme is a bit of a pain in the arse.
>
> ---8<---
>    engine.add_workitem_listener(
>      OpenWFE::Extras::SqsListener.new(:wiqueue,
> engine.application_context),
>      '2s')
> --->8---
>
> This thing makes the engine poll an SQS queue every two second. What's
> ugly is that it this engine / engine duplication.


I agree, it felt awkward writing that bit...

I'm considering moving to :
>
> ---8<---
> engine.register_listener(
>  OpenWFE::Extras::SqsListener, :queue => 'wiqueue', :freq => '2s')
> --->8---
>
> That would translate for your JabberListener to  :
>
> ---8<---
> engine.register_listener(
>  OpenWFE::Extras::JabberListener, :jabber_id => 'bot0', :password =>
> 'wyvern', :contacts => [ 'kenn...@devbox'])
> --->8---
>
> The listener #initialize would have to be turned into :
>
> ---8<---
> def initialize (application_context, opts={})
>  # ...
> end
> --->8---
>
>
> What do you think ?


By all means, I think it's a great change and helps keep things simple. I'm
also considering cleaning it up so you can share a single XMPP connection
between the participant and the listener, but I'll have to make sure they
don't step on each other's toes.

Thanks for all the inspiring work!


-- 
Kenneth Kalmer
[email protected]
http://opensourcery.co.za

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Ruote (OpenWFEru) users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/openwferu-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to