Sha256: b9d6a6313245cdc4ebd3b022b8d2ff0ef25a1f8054db09bcdff9058997e0d7f8

Contents?: true

Size: 599 Bytes

Versions: 8

Compression:

Stored size: 599 Bytes

Contents

require 'pallets'
require 'pallets/middleware/appsignal_instrumenter'

Appsignal.config = Appsignal::Config.new(
  File.expand_path(File.dirname(__FILE__)),
  "development"
)
Appsignal.start
Appsignal.start_logger

Pallets.configure do |c|
  c.middleware << Pallets::Middleware::AppsignalInstrumenter
end

class Appsignaling < Pallets::Workflow
  task 'Signaling'
  task 'ReturningSignal' => 'Signaling'
end

class Signaling < Pallets::Task
  def run
    puts context['signal']
  end
end

class ReturningSignal < Pallets::Task
  def run
    puts 'Ho!'
  end
end

Appsignaling.new(signal: 'Hey').run

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
pallets-0.11.0 examples/appsignal.rb
pallets-0.10.0 examples/appsignal.rb
pallets-0.9.0 examples/appsignal.rb
pallets-0.8.0 examples/appsignal.rb
pallets-0.7.0 examples/appsignal.rb
pallets-0.6.0 examples/appsignal.rb
pallets-0.5.1 examples/appsignal.rb
pallets-0.5.0 examples/appsignal.rb