lib/rocket_job/plugins/job/model.rb in rocketjob-3.0.3 vs lib/rocket_job/plugins/job/model.rb in rocketjob-3.0.4

- old
+ new

@@ -251,9 +251,15 @@ end end h end + # Returns [Boolean] whether the worker runs on a particular server. + def worker_on_server?(server_name) + return false unless worker_name.present? && server_name.present? + worker_name.start_with?(server_name) + end + end end end end