lib/rocket_job/plugins/job/worker.rb in rocketjob-3.0.0.beta3 vs lib/rocket_job/plugins/job/worker.rb in rocketjob-3.0.0.rc1

- old
+ new

@@ -167,12 +167,12 @@ end false end # Returns [Hash<String:[Array<ActiveWorker>]>] All servers actively working on this job - def rocket_job_active_servers - return {} unless running? - {worker_name => [ActiveServer.new(worker_name, started_at, self)]} + def rocket_job_active_workers(server_name = nil) + return [] if !running? || (server_name && !worker_name.start_with(server_name)) + [ActiveWorker.new(worker_name, started_at, self)] end end end end