README.md in healthety-0.0.6 vs README.md in healthety-0.0.7

- old
+ new

@@ -15,24 +15,18 @@ Healthety.workers do host "localhost" port 41234 - worker :load_average do - interval 0.5 - # Gets load average with a system call (Mac OS X) - value `w | head -n1 | cut -f4 -d":" | cut -f2 -d" "`.to_f - end - worker :random do - interval 2 + interval 1 value rand(10) end end ``` -That's all you need to do to define two different workers. +That's all you need to do to define a worker. ### Defining helpers If you want to define some helper methods create a new module first. Note the `helpers` method at the end to include your module into the workers. In this case a new file called `connection_helper.rb` contains the MySQL connection handling. @@ -59,9 +53,15 @@ require "connection_helper" Healthety.workers do host "localhost" port 41234 + + worker :load_average do + interval 0.5 + # Gets load average with a system call (Mac OS X) + value `w | head -n1 | cut -f4 -d":" | cut -f2 -d" "`.to_f + end worker :user_count do interval 5 value mysql.query("SELECT COUNT(*) AS count FROM users").first["count"] end