Sha256: de3c29af62074fbfe01e2246d897f607677ba972cd7dcc44ce6efe92f2c9d6e1

Contents?: true

Size: 360 Bytes

Versions: 7

Compression:

Stored size: 360 Bytes

Contents

require 'artoo/drivers/driver'

module Artoo
  module Drivers
    # Pings itself
    class Pinger2 < Driver
      def start_driver
        every(interval) do
          @count = rand(100000)
          publish(event_topic_name("update"), "alive", @count)
          publish(event_topic_name("alive"), @count)
        end

        super
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
artoo-0.4.0 lib/artoo/drivers/pinger2.rb
artoo-0.3.0 lib/artoo/drivers/pinger2.rb
artoo-0.2.0 lib/artoo/drivers/pinger2.rb
artoo-0.1.3 lib/artoo/drivers/pinger2.rb
artoo-0.1.2 lib/artoo/drivers/pinger2.rb
artoo-0.1.1 lib/artoo/drivers/pinger2.rb
artoo-0.1.0 lib/artoo/drivers/pinger2.rb