Sha256: 506c8b0ce46ee141be326a3747e7036dc2304e6bd0bd43244016fb1b1fcf0884

Contents?: true

Size: 441 Bytes

Versions: 10

Compression:

Stored size: 441 Bytes

Contents

module MissionControl::Jobs::Server::Workers
  def workers_relation
    MissionControl::Jobs::WorkersRelation.new(queue_adapter: queue_adapter)
  end

  def find_worker(worker_id)
    if worker = queue_adapter.find_worker(worker_id)
      MissionControl::Jobs::Worker.new(queue_adapter: queue_adapter, **worker)
    else
      raise MissionControl::Jobs::Errors::ResourceNotFound, "Worker with id '#{worker_id}' not found"
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
mission_control-jobs-0.6.0 lib/mission_control/jobs/server/workers.rb
mission_control-jobs-0.5.0 lib/mission_control/jobs/server/workers.rb
mission_control-jobs-0.4.0 lib/mission_control/jobs/server/workers.rb
mission_control-jobs-0.3.3 lib/mission_control/jobs/server/workers.rb
mission_control-jobs-0.3.2 lib/mission_control/jobs/server/workers.rb
mission_control-jobs-0.3.1 lib/mission_control/jobs/server/workers.rb
mission_control-jobs-0.3.0 lib/mission_control/jobs/server/workers.rb
mission_control-jobs-0.2.2 lib/mission_control/jobs/server/workers.rb
mission_control-jobs-0.2.1 lib/mission_control/jobs/server/workers.rb
mission_control-jobs-0.2.0 lib/mission_control/jobs/server/workers.rb