Hi Kenneth, hi list,
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'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 ?
--
John Mettraux - http://jmettraux.wordpress.com
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---