Skip to content

Commit

Permalink
Updated example to use convenience methods
Browse files Browse the repository at this point in the history
Signed-off-by: ezmobius <ez@engineyard.com>
  • Loading branch information
Ian Leitch authored and ezmobius committed Feb 19, 2009
1 parent 53f33aa commit 049f5cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/cli.rb
Expand Up @@ -20,13 +20,13 @@

EM.run do
# start up a new mapper with a ping time of 15 seconds
mapper = Nanite::Mapper.start(:host => 'localhost', :user => 'mapper', :pass => 'testing', :vhost => '/nanite', :log_level => 'info')
Nanite.start_mapper(:host => 'localhost', :user => 'mapper', :pass => 'testing', :vhost => '/nanite', :log_level => 'info')

# have this run after 16 seconds so we can be pretty sure that the mapper
# has already received pings from running nanites and registered them.
EM.add_timer(16) do
# call our /simple/echo nanite, and pass it a string to echo back
mapper.request("/simple/echo", "hello world!") do |res|
Nanite.request("/simple/echo", "hello world!") do |res|
p res
EM.stop_event_loop
end
Expand Down

0 comments on commit 049f5cc

Please sign in to comment.