lib/rocket_job/plugins/job/persistence.rb in rocketjob-2.0.0 vs lib/rocket_job/plugins/job/persistence.rb in rocketjob-2.1.1
- old
+ new
@@ -107,10 +107,10 @@
count: {'$sum' => 1}
}
}
]
).each do |result|
- counts[result['_id']] = result['count']
+ counts[result['_id'].to_sym] = result['count']
end
# Calculate :queued_now and :scheduled if there are queued jobs
if queued_count = counts[:queued]
scheduled_count = RocketJob::Job.where(state: :queued, run_at: {'$gt' => Time.now}).count