Sha256: 282a0426fe027e284e8ede5fcd52a0e61122d2d415f8722791d1e71628a1ec58

Contents?: true

Size: 715 Bytes

Versions: 15

Compression:

Stored size: 715 Bytes

Contents

# -*- coding: utf-8 -*-
require 'tengine/core'

# カーネルはイベントevent51を受け取ったらDBに保存。
# 対応するハンドラを実行して最初にsubmitされたときにACKを返す。
ack_policy(:at_first_submit, :event51)

driver :driver51_1 do
  # 最初に実行されるハンドラではsubmitしないので、ACKされない
  on:event51 do
    puts "handler51_1"
  end
end

driver :driver51_2 do
  # このハンドラでsubmitするので、ACKする
  on:event51 do
    puts "handler51_2"
    submit
  end
end

driver :driver51_3 do
  # このハンドラでsubmitするが、すでにACKしているのでACKしない
  on:event51 do
    puts "handler51_3"
    submit
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
tengine_core-1.2.2 examples/uc51_commit_event_at_first_submit.rb
tengine_core-1.2.1 examples/uc51_commit_event_at_first_submit.rb
tengine_core-1.2.0 examples/uc51_commit_event_at_first_submit.rb
tengine_core-1.1.0 examples/uc51_commit_event_at_first_submit.rb
tengine_core-0.5.39 examples/uc51_commit_event_at_first_submit.rb
tengine_core-0.5.38 examples/uc51_commit_event_at_first_submit.rb
tengine_core-0.5.37 examples/uc51_commit_event_at_first_submit.rb
tengine_core-0.5.36 examples/uc51_commit_event_at_first_submit.rb
tengine_core-0.5.35 examples/uc51_commit_event_at_first_submit.rb
tengine_core-0.5.34 examples/uc51_commit_event_at_first_submit.rb
tengine_core-0.5.33 examples/uc51_commit_event_at_first_submit.rb
tengine_core-0.5.32 examples/uc51_commit_event_at_first_submit.rb
tengine_core-0.5.31 examples/uc51_commit_event_at_first_submit.rb
tengine_core-0.5.30 examples/uc51_commit_event_at_first_submit.rb
tengine_core-0.5.28 examples/uc51_commit_event_at_first_submit.rb