def check_in_periodically
      @check_in_thread = Thread.new do
        loop do
          check_on_workers
          reply = ""
          1.upto(5).each do | attempt_number |
            # sleep for an ever increasing amount of time to prevent overloading the server
            sleep CHECK_IN_INTERVAL * attempt_number
            reply = check_in
            # if we did not receive a reply, the server has went away; it
            # will reply with an empty string if the check-in succeeds
            if reply.nil?
              CloudCrowd.log "Failed on attempt ##{attempt_number} to check in with server"
            else
              break
            end
          end
          if reply.nil?
            CloudCrowd.log "Giving up after repeated attempts to contact server"
            raise SystemExit
          end
        end
      end
    end
def check_in_periodically
      @check_in_thread = Thread.new do
        loop do
          check_on_workers
          reply = ""
          1.upto(5).each do | attempt_number |
            # sleep for an ever increasing amount of time to prevent overloading the server
            sleep CHECK_IN_INTERVAL * attempt_number
            reply = check_in
            # if we did not receive a reply, the server has went away; it
            # will reply with an empty string if the check-in succeeds
            if reply.nil?
              CloudCrowd.log "Failed on attempt ##{attempt_number} to check in with server"
            else
              break
            end
          end
          if reply.nil?
            CloudCrowd.log "Giving up after repeated attempts to contact server"
            raise SystemExit
          end
        end
      end
    end
If communication is interrupted for external reasons, the central server
 will assume that the node has gone down. Checking in will let central know
 it's still online.