# File lib/ruote/dashboard.rb, line 67 def initialize(worker_or_storage, opts=true) @context = worker_or_storage.context @context.dashboard = self @variables = EngineVariables.new(@context.storage) workers = @context.services.select { |ser| ser.respond_to?(:run) && ser.respond_to?(:run_in_thread) } return unless opts && workers.any? # let's isolate a worker to join worker = if opts.is_a?(Hash) && opts[:join] workers.find { |wor| wor.name == 'worker' } || workers.first else nil end (workers - Array(worker)).each { |wor| wor.run_in_thread } # launch their thread, but let's not join them worker.run if worker # and let's not return end