diff options
| author | Steve Kemp <steve@steve.org.uk> | 2015-02-18 08:33:35 +0000 | 
|---|---|---|
| committer | Steve Kemp <steve@steve.org.uk> | 2015-02-18 08:33:35 +0000 | 
| commit | 9f07883ab93df9f6dc1b402ffaad084cfbfcfd74 (patch) | |
| tree | df6bdac1aed16eef197d7718237aac2c7a95c4e0 | |
| parent | 4a675e83201d04de805bbce50ae4c92ac4117fe4 (diff) | |
Updated comments for better accuracy.
| -rw-r--r-- | lib/custodian/worker.rb | 19 | 
1 files changed, 12 insertions, 7 deletions
| diff --git a/lib/custodian/worker.rb b/lib/custodian/worker.rb index 52d00e1..e036168 100644 --- a/lib/custodian/worker.rb +++ b/lib/custodian/worker.rb @@ -53,6 +53,7 @@ module Custodian      #      attr_reader :retry_count +      #      # Should we sleep between repeated tests?      # @@ -74,14 +75,16 @@ module Custodian      # -    # Constructor: Connect to the queue, and setup our settings. +    # Constructor. +    # +    # Connect to the queue, and record interesting settings away.      #      def initialize( settings )        # Connect to the queue        @queue = QueueType.create( settings.queue_type() ) -      # Get the alerter-type to instantiate +      # Get the alerter-type(s) to instantiate        @alerter = settings.alerter        # Instantiate the logger. @@ -103,8 +106,7 @@ module Custodian      # -    # Write the given message to our logfile - and show it to the console -    # if we're running with '--verbose' in play +    # Write the given message to our logfile - and show it to the console too.      #      def log_message( msg )        @logger.info( msg ) @@ -145,9 +147,8 @@ module Custodian        raise ArgumentError, "Job was empty" if (job.nil?)        raise ArgumentError, "Job was not a string" unless job.kind_of?(String) -        # -      # Create the test-object from our class-factory +      # Create test-objects from our class-factory, and process them.        #        Custodian::TestFactory.create( job ).each do |test|          process_single_test( test ) @@ -156,7 +157,11 @@ module Custodian      # -    # Fetch a single job from the queue, and process it. +    # Process a single test. +    # +    # A test which succeeds will clear any outstanding alert. +    # +    # Any test which fails for N-times in a row will raise an alert.      #      def process_single_test( test ) | 
