delayed_job_active_record 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -15,5 +15,5 @@ Gem::Specification.new do |spec|
15
15
  spec.require_paths = ['lib']
16
16
  spec.summary = 'ActiveRecord backend for DelayedJob'
17
17
  spec.test_files = Dir.glob("spec/**/*")
18
- spec.version = '0.4.1'
18
+ spec.version = '0.4.2'
19
19
  end
@@ -58,7 +58,7 @@ module Delayed
58
58
  # This locks the single record 'FOR UPDATE' in the subquery (http://www.postgresql.org/docs/9.0/static/sql-select.html#SQL-FOR-UPDATE-SHARE)
59
59
  # Note: active_record would attempt to generate UPDATE...LIMIT like sql for postgres if we use a .limit() filter, but it would not use
60
60
  # 'FOR UPDATE' and we would have many locking conflicts
61
- quotedTableName = ::ActiveRecord::Base.connection.quote_column_name(self.table_name)
61
+ quotedTableName = ::ActiveRecord::Base.connection.quote_table_name(self.table_name)
62
62
  subquerySql = nextScope.lock(true).select('id').to_sql
63
63
  reserved = self.find_by_sql(["UPDATE #{quotedTableName} SET locked_at = ?, locked_by = ? WHERE id IN (#{subquerySql}) RETURNING *",now,worker.name])
64
64
  return reserved[0]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: delayed_job_active_record
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2013-02-12 00:00:00.000000000 Z
14
+ date: 2013-02-26 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: activerecord
@@ -91,7 +91,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
91
91
  version: '0'
92
92
  segments:
93
93
  - 0
94
- hash: -3937611050196962247
94
+ hash: 4028435250448725028
95
95
  required_rubygems_version: !ruby/object:Gem::Requirement
96
96
  none: false
97
97
  requirements:
@@ -100,10 +100,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
100
100
  version: '0'
101
101
  segments:
102
102
  - 0
103
- hash: -3937611050196962247
103
+ hash: 4028435250448725028
104
104
  requirements: []
105
105
  rubyforge_project:
106
- rubygems_version: 1.8.23
106
+ rubygems_version: 1.8.25
107
107
  signing_key:
108
108
  specification_version: 3
109
109
  summary: ActiveRecord backend for DelayedJob