Sha256: 46aba920a05e512c09794921ff4c4a4060b6d08ba498b5be755f046bc79ccf2b

Contents?: true

Size: 456 Bytes

Versions: 9

Compression:

Stored size: 456 Bytes

Contents

#!/usr/bin/env ruby

require_relative 'example_helper'

class Sleeper < Dynflow::Action
  def run(event = nil)
    sleep
  end
end

def report(msg)
  puts "===== #{Time.now}: #{msg}"
end

if $0 == __FILE__
  ExampleHelper.world.action_logger.level = 1
  ExampleHelper.world.logger.level = 0

  ExampleHelper.world.trigger(Sleeper)
  report "Sleeping"
  sleep 5

  report "Asking to terminate"
  ExampleHelper.world.terminate.wait
  report "Terminated"
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
dynflow-1.3.0 examples/termination.rb
dynflow-1.2.3 examples/termination.rb
dynflow-1.2.2 examples/termination.rb
dynflow-1.2.1 examples/termination.rb
dynflow-1.2.0 examples/termination.rb
dynflow-1.2.0.pre1 examples/termination.rb
dynflow-1.1.6 examples/termination.rb
dynflow-1.1.5 examples/termination.rb
dynflow-1.1.4 examples/termination.rb