summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2012-11-12 21:03:53 +0000
committerSteve Kemp <steve@steve.org.uk>2012-11-12 21:03:53 +0000
commit30348ab3bf61d3ef08258b2d6490b4087c3cf3e8 (patch)
treeabcabe785d531e16409eed597451835ef00a064f
parent8978660d37e1e2c91e0c2e7f8852ba344047fa6e (diff)
Comment updates.
-rwxr-xr-xworker/worker25
1 files changed, 19 insertions, 6 deletions
diff --git a/worker/worker b/worker/worker
index 6380cf8..9389310 100755
--- a/worker/worker
+++ b/worker/worker
@@ -26,7 +26,7 @@ require 'json';
#
-# Implementations for our protocol tests.
+# Implementation of our protocol tests.
#
require 'tests/ftp'
require 'tests/http'
@@ -42,14 +42,21 @@ require 'tests/ssh'
-
+#
+# TODO
+#
+# Use the mauve-library to clear the specified alert
+#
def clear_alert( hash )
puts "CLEARING ALERT: #{hash}"
end
-
-
+#
+# TODO
+#
+# Use the mauve-library to raise the specified alert
+#
def raise_alert( hash )
puts "Raising ALERT: #{hash}"
end
@@ -78,7 +85,12 @@ loop do
#
# Find the next job.
#
- job = beanstalk.reserve
+ # TODO:
+ # 1. Reserve with a timeout
+ #
+ # 2. Send a heartbeat so that we know this script is still running
+ #
+ job = beanstalk.reserve()
puts "Job acquired: #{Time.new.inspect}"
@@ -99,7 +111,8 @@ loop do
#
- # Switch on type of test.
+ # Given the test-type of "YYY" we'll call the method "YYY_test", which
+ # we assume comes from one of the files beneath ./tests/
#
test = hash['test_type']
method = "#{test}_test".to_sym