Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Sep 15 22:44
    jmettraux commented #29
  • Sep 15 22:26
    Subtletree commented #29
  • Sep 09 23:52
    jmettraux closed #29
  • Sep 09 23:52
    jmettraux commented #29
  • Sep 07 07:20
    jmettraux commented #29
  • Sep 07 07:18

    jmettraux on master

    Fix parsing of "set original 1"… (compare)

  • Sep 06 04:16
    jmettraux commented #29
  • Sep 06 04:15
    jmettraux assigned #29
  • Sep 05 23:39
    Subtletree edited #29
  • Sep 05 23:34
    Subtletree opened #29
  • Aug 31 08:30

    jmettraux on master

    Simplify Loader#domains(start=n… Implement Loader#definitions(st… Implement HashLoader#definition… (compare)

  • Aug 23 23:24

    jmettraux on master

    Accept env root when initializi… (compare)

  • Aug 22 21:54

    jmettraux on master

    Complete Loader#domains(start='… Implement HashLoader#domains(st… (compare)

  • Aug 21 22:58

    jmettraux on master

    Allow custom schema_info for St… Implement Loader#domains, first… (compare)

  • Aug 17 05:47

    jmettraux on master

    Allow custom schema_info in Sto… (compare)

  • Aug 16 04:37

    jmettraux on master

    Add "use" section to readme [ci… (compare)

  • Aug 16 00:08

    jmettraux on master

    Ensure HashLoader#add_tasker ac… Ensure HashLoader#add_tasker ac… (compare)

  • Aug 15 07:54

    jmettraux on master

    Stop using Ruby Timeout module … (compare)

  • Aug 13 00:32

    jmettraux on master

    Use if oneliners in Python call… Simplify JRuby cmdline parser (compare)

  • Aug 12 23:05

    jmettraux on master

    Ensure caller accepts env vars … (compare)

Ryan Scott
@Subtletree
Definitely keen to make some additions to the docs. Turned my tasker stub into a helper
  module AutoReplyTasker
    def task
      super
      reply(on_complete) unless @has_replied
    end

    def reply(message = @message, force = false)
      @has_replied = true
      super(message, force)
    end
  end

  def autoreply_tasker(tasker_class)
    cloned_task = tasker_class.clone
    cloned_task.prepend(AutoReplyTasker)
    stub_const(tasker_class.to_s, cloned_task)
  end
John Mettraux
@jmettraux
nice!
Ryan Scott
@Subtletree

Hey John! Quick question about timeout's, Is it possible to have a timeout which doesn't cancel the node

john 'review application' timeout: '3d'
  on_timeout: (def \ email 'send reminder to john')

After 3 days remind John to review the application and keep the review_application task for john to perform.

Ryan Scott
@Subtletree

I'm trying to look into the above myself, but I'm getting stuck on some flor internals, this is where I am so far.

When review_application is reached the timeout is saved to flor_timers.
Every tick the timers are checked to see if any are ready.
After 3d a tick triggers the timer and puts it's message into flor_messages table
This message is picked up by the scheduler and eventually passed to Executor#process

After this I get lost, where does the message type get determined and routed to it's specific procedure?

Ryan Scott
@Subtletree
https://github.com/floraison/flor/blob/063b7da4a5e220148ccb83b84625f046db42ced0/lib/flor/core/executor.rb#L454
Here the method name at message['point'] is invoked, in this case trigger
Ryan Scott
@Subtletree
This returns the trigger's embedded message which is a cancel and flavour = timeout
Maybe a new timer/on_timer combination would more sense
John Mettraux
@jmettraux
@Subtletree hello, that's a good point
in the mid term, what I want is something like:
john 'review application' timers: '3d: reminder, 7d: timeout'
Ryan Scott
@Subtletree
ah yeah that looks perfect
I was just having a go at implementing timer/on_timerbut I think your suggestion is beyond me
John Mettraux
@jmettraux
roughly:
john 'review application'   
  sequence flank                  
    sleep '3d'                                                                  
    send_reminder
or
sequence
  sequence flank                  
    sleep '3d'                                                                  
    send_reminder                                                               
  john 'review application'
the "flanking" sequence gets cancelled as soon as its parent node is done
Ryan Scott
@Subtletree
That is actually perfect, because my usecase would have another 'user' task in the flanking branch which would need to be cancelled if the application is reviewed
John Mettraux
@jmettraux
if you give me a bit of time, I could implement the timers: attribute, taking inspiration from ruote, I strongly want something like that for flor, a flow of having echelon of flanking events
but flank might help in the meantime (or as you seem to indicate, be better suited)
Ryan Scott
@Subtletree

Yeah my usecase is actually more like

john 'review application'   
  sequence flank                  
    sleep '3d'                                                                  
    alice 'remind john'
    email 'send reminder email' if ret = 'email' # alice can choose to remind john in person

so flanking might be my new favourite haha

John Mettraux
@jmettraux
ok, I'll try my best to help you with that. I'm on the Western Europe timezone until the 8th of July actually.
Ryan Scott
@Subtletree
Ah nice. I'll have a go at using flank now and let you know how I go. Thanks for your input as always!
John Mettraux
@jmettraux
You're welcome! It's a nice to tinker around with you
Ryan Scott
@Subtletree
:grinning: :thumbsup:
Ryan Scott
@Subtletree
Hey John, how's europe treating you? Is it a holiday?
Another flor question for you.. Would domains be useful for versioning? e.g I've updated my taskers which are now incompatible with the old process definition
John Mettraux
@jmettraux
@Subtletree Hello Ryan, Europe is good, it's half work, half sorting family matters
Yes, domain could be used for versioning, especially if you want to have older versions of taskers coexisting with newer versions
I guess you could do acme.org.accounting.v1.alpha vs v2.alpha
ah, well, it's probably a bit more complicated
another technique would be to place a version number in a (root) process variable and have the "ganger" look at it to decide what version of "alpha" or "alice" to route to
John Mettraux
@jmettraux
the simplest technique would be to have the version number in the tasker name
Ryan Scott
@Subtletree
Hmm good call, I'll see what method works best for me, cheers!
John Mettraux
@jmettraux
:-)
and if you find a better method, please teach us!
Ryan Scott
@Subtletree
Hey John, what's the situation with these spawn changes and jRuby?
John Mettraux
@jmettraux
Hello Ryan, I noticed a couple weeks ago that the spawn tests were failing on Travis/JRuby
so I'm now developing an "adapter" for JRuby, using Java's ProcessBuilder
are you using JRuby?
Ryan Scott
@Subtletree
not at the moment, was going to look at switching if MRI threads ever became a bottleneck
John Mettraux
@jmettraux
ok, please tell me if that happens
Ryan Scott
@Subtletree
will do
I need to set aside some time to help with the docs a bit, a rails guide, and also maybe an 'intro for dummies' type post
John Mettraux
@jmettraux
that would be wonderful
John Mettraux
@jmettraux
Just added a "use" section to the readme: floraison/flor@699cbd4 feedback is welcome :-)
Ryan Scott
@Subtletree
'Use' section is great. I remember when first looking at the project was new to workflow engines and ended up coming to gitter to ask exactly what flor was and if it suited my use case
The invoice example is good too, gives a more top level view of what flor can accomplish
John Mettraux
@jmettraux
thanks!