On Tue, Apr 20, 2010 at 11:38 PM, John Mettraux <[email protected]> wrote:
>
> Phase 1 is in :
>
>  http://github.com/jmettraux/ruote/commit/91fac72da25af53cb6fbf6d0d9b77300681f413a
>
> I will enable re_apply(workitem, :in => 'x') and re_apply(workitem,
> :at => 'y') tomorrow.

Done.

Here's what you can do with ruote "trunk" :

---8<---
  class RetryParticipant
    include Ruote::LocalParticipant
  
    def initialize (opts)
      @opts = opts
    end
  
    def consume (workitem)
      begin
        do_the_job
        reply(workitem)
      rescue
        re_dispatch(workitem, :in => @opts['delay'] || '1s')
      end
    end
  
    def cancel (fei, flavour)
      unschedule_re_dispatch(fei)
    end
  end
--->8---


Best regards,

-- 
John Mettraux   -   http://jmettraux.wordpress.com

-- 
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

Reply via email to