On Fri, Jan 20, 2012 at 11:45:44AM +1100, David Powell wrote:
>
> > May I see the code of this participant ?
>
> module Participant
> class FileToucher
> include Ruote::LocalParticipant
>
> def initialize(opts = {})
> end
>
> def consume(workitem)
> @workitem = workitem
> FileUtils.touch [File.join(Rails.root, 'public', 'ruote_speed.txt')]
> reply_to_engine workitem
> rescue => e
> Rails.logger.error "Error in FileToucher : #{e}"
> end
>
> def cancel(fei, flavour)
> # do nothing
> end
>
> end
> end
Hello David,
@workitem = workitem
can be safely removed it seems.
As mentioned in
http://groups.google.com/group/openwferu-users/msg/570fd511f0bc7791
the flow will get stuck if there is an error.
---8<---
def consume(workitem)
FileUtils.touch [File.join(Rails.root, 'public', 'ruote_speed.txt')]
rescue => e
Rails.logger.error "Error in FileToucher : #{e}"
ensure
reply_to_engine workitem
end
--->8---
might be better.
That's consistent with the initial symptoms you described back in December...
Workitem disappearing.
I hope this helps, best regards,
--
John Mettraux - http://lambda.io/processi
--
you received this message because you are subscribed to the "ruote users" group.
to post : send email to [email protected]
to unsubscribe : send email to [email protected]
more options : http://groups.google.com/group/openwferu-users?hl=en