Project

General

Profile

« Previous | Next » 

Revision 947e1d12

Added by Marc Dequènes almost 14 years ago

  • ID 947e1d1268d5bf83f68cf14138c7c5671a899f53

[fix] Task-based client DSL: use :task instead of :thread from old DSL for task notification shortcut name

View differences:

bin/test_client
task "compare stuff" do
# ask :MapMaker, :ver1, "/api_version"
# ask :Librarian, :ver2, "/api_version"
wait_notification :thread, {:topic => "HELOz"}, 5 do |subtask, msg|
wait_notification :task, {:topic => "HELOz"}, 5 do |subtask, msg|
puts "POUET NOTIF"
subtask.finish
end
send_notification :thread, {:topic => "HELO"}
send_notification :task, {:topic => "HELO"}
wait_timer 2, true do |subtask|
c += 1
puts "TIMER !!!"
lib/cyborghood/cyborg/dsl.rb
end
def send_notification(name, data)
name = @notification_name if name == :thread
name = @notification_name if name == :task
_add_subtask("notification/#{name}/out") do |subtask|
logger.debug "Task '#{@name}': Sending notification to '#{name}'"
......
end
def wait_notification(name, criterias = {}, timeout = nil, &cb)
name = @notification_name if name == :thread
name = @notification_name if name == :task
full_results = {}

Also available in: Unified diff