Skip to content
This repository has been archived by the owner on Nov 28, 2018. It is now read-only.

Commit

Permalink
Merge with em
Browse files Browse the repository at this point in the history
  • Loading branch information
mceachen committed Jul 10, 2011
2 parents 4a982b7 + 09798ff commit 9285515
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
@@ -1,3 +1,5 @@
*.gem
*.swp
Gemfile.lock
.idea/
.bundle/
1 change: 0 additions & 1 deletion lib/delayed/backend/active_record.rb
Expand Up @@ -23,7 +23,6 @@ class Job < ::ActiveRecord::Base

scope :ready_to_run, lambda {|worker_name, max_run_time|
includes(:prerequisites).where(['(run_at <= ? AND (locked_at IS NULL OR locked_at < ?) OR locked_by = ?) AND failed_at IS NULL AND delayed_job_prerequisites.job_id IS NULL', db_time_now, db_time_now - max_run_time, worker_name])
where(['(run_at <= ? AND (locked_at IS NULL OR locked_at < ?) OR locked_by = ?) AND failed_at IS NULL', db_time_now, db_time_now - max_run_time, worker_name])
}
scope :by_priority, order('priority ASC, run_at ASC')

Expand Down

0 comments on commit 9285515

Please sign in to comment.