que 0.13.1 → 0.14.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 84236991a2c98675b76421acf236b3b2eaa08573
4
- data.tar.gz: a4b012520d11a41263be5364e32262a68a263cb2
3
+ metadata.gz: 4843d8fd43b830ae0e1d7c55704bafe7b6e6a495
4
+ data.tar.gz: a94cc144ad4f965741832cbaad85b4c0dd512163
5
5
  SHA512:
6
- metadata.gz: 4e9f11a615eb6493f5d94d715bc2b167164913e12c3b67e911efbd49a9c94c7d93c016f789f1fc1126bf86b3a495e9fc0c700e32ff8445c18230e3a4870b43de
7
- data.tar.gz: 6a94dc98d719b0ce042dac9c0e259a2f7a73d707c4bddeaec5ba6574cc63343735b9d263ec399d80cf98f8302eb0a122247effd16b4d83d736c37e2845921adf
6
+ metadata.gz: eff7a4cf805af9ebf2953aa28dfd7f4fc655b05c833d1ce33d6002acda23948c526aa0896724aa234f80d9e3fd73a3a87c06f950ff3b66486f4a4512bd8187e4
7
+ data.tar.gz: c61e4dd27ea718bee177047eff158d4d18cc57d4c73a810e985a58749b65a7ea854bb7de1bcf3663d33c2329dfefeee91ef842356467be92b913c3ad015c51fa
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ### 0.14.0 (2017-08-11)
2
+
3
+ * Fix incompatibility with Rails 5.1.
4
+
5
+ * Drop support for waking an in-process worker when an ActiveRecord transaction commits.
6
+
1
7
  ### 0.13.1 (2017-07-05)
2
8
 
3
9
  * Fix issue that caused error stacktraces to not be persisted in most cases.
@@ -7,15 +7,6 @@ module Que
7
7
  checkout_activerecord_adapter { |conn| yield conn.raw_connection }
8
8
  end
9
9
 
10
- def wake_worker_after_commit
11
- # Works with ActiveRecord 3.2 and 4 (possibly earlier, didn't check)
12
- if in_transaction?
13
- checkout_activerecord_adapter { |adapter| adapter.add_transaction_record(TransactionCallback.new) }
14
- else
15
- Que.wake!
16
- end
17
- end
18
-
19
10
  def cleanup!
20
11
  # ActiveRecord will check out connections to the current thread when
21
12
  # queries are executed and not return them to the pool until
@@ -30,32 +21,6 @@ module Que
30
21
  ::ActiveRecord::Base.clear_active_connections!
31
22
  end
32
23
 
33
- class TransactionCallback
34
- def has_transactional_callbacks?
35
- true
36
- end
37
-
38
- def rolledback!(force_restore_state = false, should_run_callbacks = true)
39
- # no-op
40
- end
41
-
42
- def committed!(should_run_callbacks = true)
43
- Que.wake!
44
- end
45
-
46
- def before_committed!(*)
47
- # no-op
48
- end
49
-
50
- def add_to_transaction
51
- # no-op.
52
- #
53
- # This is called when we're in a nested transaction. Ideally we would
54
- # `wake!` when the outer transaction gets committed, but that would be
55
- # a bigger refactor!
56
- end
57
- end
58
-
59
24
  private
60
25
 
61
26
  def checkout_activerecord_adapter(&block)
data/lib/que/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Que
4
- Version = '0.13.1'
4
+ Version = '0.14.0'
5
5
  end
@@ -104,6 +104,8 @@ unless defined?(RUBY_ENGINE) && RUBY_ENGINE == 'jruby'
104
104
  end
105
105
 
106
106
  it "should wake up a Worker after queueing a job in async mode, waiting for a transaction to commit if necessary" do
107
+ pending
108
+
107
109
  Que.mode = :async
108
110
  Que.worker_count = 4
109
111
  sleep_until { Que::Worker.workers.all? &:sleeping? }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: que
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.1
4
+ version: 0.14.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Hanks
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-05 00:00:00.000000000 Z
11
+ date: 2017-08-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -127,7 +127,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
127
127
  version: '0'
128
128
  requirements: []
129
129
  rubyforge_project:
130
- rubygems_version: 2.5.1
130
+ rubygems_version: 2.6.8
131
131
  signing_key:
132
132
  specification_version: 4
133
133
  summary: A PostgreSQL-based Job Queue