module Hat module Wrapper def initialize logger.debug "Initializing wrapper for #{@worker_id}" @stop_flag = ServerEngine::BlockingFlag.new end def run logger.debug "Starting worker #{@worker_id}" config[:worker].id = @worker_id config[:worker].logger = logger config[:worker].run until @stop_flag.set? do sleep 0.1 end end def stop @stop_flag.set! end end end