Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Better conditions for when a job is waiting to be run.

  • Loading branch information...
commit 54807cf536f106605e632fd00890c8ab86988213 1 parent c6b41a0
@obvio171 obvio171 authored committed
Showing with 2 additions and 1 deletion.
  1. +2 −1  contrib/delayed_jobs_queue_size.rb
View
3  contrib/delayed_jobs_queue_size.rb
@@ -35,7 +35,8 @@ def get_data
@db_conf['database'], @db_conf['port'],
@db_conf['socket'])
result = mysql.query("SELECT count(*) FROM delayed_jobs WHERE \
- first_started_at IS NULL OR run_at > NOW()")
+ locked_at IS NULL AND failed_at IS NULL AND \
+ finished_at IS NULL")
value = result.fetch_hash.values.first
puts "jobs.value #{value}"
end
Please sign in to comment.
Something went wrong with that request. Please try again.