Sha256: a35bccf6e7bf2b6fe70cb71c6877874a379aa357c25946b5db10a63bcce2d7a3
Contents?: true
Size: 507 Bytes
Versions: 6
Compression:
Stored size: 507 Bytes
Contents
require 'rubygems' require 'daemons' require 'logger' require File.dirname(__FILE__) + '/heartbeat-client' begin puts "Using config in your home directory" @config = YAML.load(File.read("#{ENV['HOME']}/.heartbeat-client.yml")) rescue Errno::ENOENT raise "heartbeat-client.yml expected in ~/.heartbeat-client.yml" end unless @config['apikey'] puts "API Key not found!" exit end Daemons.run_proc('heartbeat-client.rb') do loop do Heartbeat.create(@config['apikey']) sleep(30) end end
Version data entries
6 entries across 6 versions & 1 rubygems