Sha256: 43f1d0d0cd42eea0c2dd370f29968ed42e86a39d7d4f4fa0a12cd49608be5c62

Contents?: true

Size: 486 Bytes

Versions: 27

Compression:

Stored size: 486 Bytes

Contents

#!/usr/bin/env ruby
# frozen_string_literal: true

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

27 entries across 27 versions & 1 rubygems

Version Path
dynflow-1.9.0 examples/termination.rb
dynflow-1.8.3 examples/termination.rb
dynflow-1.8.2 examples/termination.rb
dynflow-1.8.1 examples/termination.rb
dynflow-1.8.0 examples/termination.rb
dynflow-1.7.0 examples/termination.rb
dynflow-1.6.11 examples/termination.rb
dynflow-1.6.10 examples/termination.rb
dynflow-1.6.8 examples/termination.rb
dynflow-1.6.7 examples/termination.rb
dynflow-1.6.6 examples/termination.rb
dynflow-1.6.5 examples/termination.rb
dynflow-1.6.4 examples/termination.rb
dynflow-1.6.3 examples/termination.rb
dynflow-1.6.2 examples/termination.rb
dynflow-1.6.1 examples/termination.rb
dynflow-1.4.9 examples/termination.rb
dynflow-1.4.8 examples/termination.rb
dynflow-1.5.0 examples/termination.rb
dynflow-1.4.7 examples/termination.rb