lib/good_job/cli.rb in good_job-0.8.0 vs lib/good_job/cli.rb in good_job-0.8.1
- old
+ new
@@ -34,14 +34,14 @@
poll_interval = (
options[:poll_interval] ||
ENV['GOOD_JOB_POLL_INTERVAL']
).to_i
- job_query = GoodJob::Job.all
+ job_query = GoodJob::Job.all.priority_ordered
queue_names_without_all = queue_names.reject { |q| q == '*' }
job_query = job_query.where(queue_name: queue_names_without_all) unless queue_names_without_all.size.zero?
- job_performer = job_query.only_scheduled.priority_ordered.to_performer
+ job_performer = job_query.to_performer
$stdout.puts "GoodJob worker starting with max_threads=#{max_threads} on queues=#{queue_names.join(',')}"
timer_options = {}
timer_options[:execution_interval] = poll_interval if poll_interval.positive?