taskinator 0.4.6 → 0.4.7

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
  SHA256:
3
- metadata.gz: e051c42ee9d4fe4d1aae1635af78656a3e1c19b32309b8440869a5798eab57f9
4
- data.tar.gz: 5e1fb74f1bf9ec2cc9d34585f7f34cb8a1172fc0fb21e74d03d4ca9e8c9d7112
3
+ metadata.gz: 0ea786056f74987f21643d392336032d09896df7ddc01d462a78a257a19088d8
4
+ data.tar.gz: f693f14e2dac9341f1c83c6bf04b12da9d96261498198cc712e71be5b4b51955
5
5
  SHA512:
6
- metadata.gz: 214b6d9c36950eb0c535bdd06e2f89297067a710930ff08284b563e6f063769c9ac671fc5198483488f25ad81e129c22094d19b03c4890618000dbc2a3bfc805
7
- data.tar.gz: e910423be085712e48faf38838ffe4131d021eeb2a918c30fc83250e7af2ab4235d66805118db92f96b74c0d0c467c7a92f94cbcf448b0011d55a063082a743c
6
+ metadata.gz: 6151322f48c6215c41ffeeb6fc08d43aa871f9f76d04f628c80d29fa423b22fb0a3ee589803efd1503c3b59491bc4e2ace36879f801638898b9ace0557e4f180
7
+ data.tar.gz: 65ba806d211f62c8ff12ea3c036b037f53567a17f1a848129ba8f737d4fc0267be7435d6e315591afa81527275042bf22cc04066c74684b6cc54b0e3ce8691f8
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- taskinator (0.4.6)
4
+ taskinator (0.4.7)
5
5
  builder (>= 3.2.2)
6
6
  connection_pool (>= 2.2.0)
7
7
  globalid (~> 0.3)
@@ -53,9 +53,9 @@ module Taskinator
53
53
 
54
54
  def save
55
55
  Taskinator.redis do |conn|
56
- conn.pipelined do
57
- visitor = RedisSerializationVisitor.new(conn, self).visit
58
- conn.hmset(
56
+ conn.pipelined do |pipeline|
57
+ visitor = RedisSerializationVisitor.new(pipeline, self).visit
58
+ pipeline.hmset(
59
59
  Taskinator::Process.key_for(uuid),
60
60
  :tasks_count, visitor.task_count,
61
61
  :tasks_failed, 0,
@@ -109,15 +109,15 @@ module Taskinator
109
109
  @updated_at = Time.now.utc
110
110
  Taskinator.redis do |conn|
111
111
  process_key = self.process_key
112
- conn.multi do
113
- conn.hmset(
112
+ conn.multi do |transaction|
113
+ transaction.hmset(
114
114
  self.key,
115
115
  :state, new_state,
116
116
  :updated_at, @updated_at
117
117
  )
118
118
 
119
119
  # also update the "root" process
120
- conn.hset(
120
+ transaction.hset(
121
121
  process_key,
122
122
  :updated_at, @updated_at
123
123
  )
@@ -178,9 +178,9 @@ module Taskinator
178
178
  define_method "incr_#{status}" do
179
179
  Taskinator.redis do |conn|
180
180
  process_key = self.process_key
181
- conn.multi do
182
- conn.hincrby process_key, "tasks_#{status}", 1
183
- conn.hset process_key, :updated_at, Time.now.utc
181
+ conn.multi do |transaction|
182
+ transaction.hincrby process_key, "tasks_#{status}", 1
183
+ transaction.hset process_key, :updated_at, Time.now.utc
184
184
  end
185
185
  end
186
186
  end
@@ -467,9 +467,9 @@ module Taskinator
467
467
 
468
468
  # pre-load all the attributes to reduce redis hits
469
469
  Taskinator.redis do |conn|
470
- keys, values = conn.multi do
471
- conn.hkeys(@key)
472
- conn.hvals(@key)
470
+ keys, values = conn.multi do |transaction|
471
+ transaction.hkeys(@key)
472
+ transaction.hvals(@key)
473
473
  end
474
474
  @attribute_values = Hash[keys.collect(&:to_sym).zip(values)]
475
475
  end
@@ -1,3 +1,3 @@
1
1
  module Taskinator
2
- VERSION = "0.4.6"
2
+ VERSION = "0.4.7"
3
3
  end
@@ -17,8 +17,8 @@ describe Taskinator::Api, :redis => true do
17
17
  allow_any_instance_of(Process).to receive(:fetch) {}
18
18
 
19
19
  Taskinator.redis do |conn|
20
- conn.multi do
21
- 3.times {|i| conn.sadd(Taskinator::Persistence.processes_list_key, i) }
20
+ conn.multi do |transaction|
21
+ 3.times {|i| transaction.sadd(Taskinator::Persistence.processes_list_key, i) }
22
22
  end
23
23
  end
24
24
 
@@ -34,8 +34,8 @@ describe Taskinator::Api, :redis => true do
34
34
 
35
35
  it "yields the number of processes" do
36
36
  Taskinator.redis do |conn|
37
- conn.multi do
38
- 3.times {|i| conn.sadd(Taskinator::Persistence.processes_list_key, i) }
37
+ conn.multi do |transaction|
38
+ 3.times {|i| transaction.sadd(Taskinator::Persistence.processes_list_key, i) }
39
39
  end
40
40
  end
41
41
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: taskinator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.6
4
+ version: 0.4.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Stefano
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-12 00:00:00.000000000 Z
11
+ date: 2022-02-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redis