queue-processor 0.0.8 → 0.0.9

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: 88481dcefd871ebdea1fe2286bffe0aa125a379dd219753f28e21959b792e59b
4
- data.tar.gz: 86d6a3baa440f8d217f2333fde259e09ba5e7c92bb67f2eb873f73ab438e2ca9
3
+ metadata.gz: 8d2e7fef7f7adcfdd5d402fb467c506488d1e3044dd0de5a539c092b38aba122
4
+ data.tar.gz: 36a845eaf360cba10f10aa23704268ac8f8b4130852882dd3f44c4356dab4049
5
5
  SHA512:
6
- metadata.gz: bcb8b7cb69e2e0b593287da839c12c000ac8479644a85af9af2b9e1d47f4e2b036fbd0ac3b284ee21defd255e56c540e81ada695593024d3cc15e85f2419120f
7
- data.tar.gz: bf17501f746ca8d457ee7f965a4e468653b8419013cb12c3de31787692f9ce2de0368998cef0d182247fef43a2fcf0f2a5291b05275bf3b0929af6b1cd0c36fe
6
+ metadata.gz: 73103cfe287c7a0bbe9e87f798c4ccd4e227df2ba0f4ae03deaf8714d645ef8602ac603db9b9e988bb7b44ef88eb8a55113636c2cff57d604a6518e8eef501e5
7
+ data.tar.gz: '055883690b2be2f31a7be6d7097aa049ef3da272e84812d8683ad5d3c16c543e1eda94816b91ab25a8126784d944d316a4423a0b6ca7e340871093c13889e3bd'
data/README.md CHANGED
@@ -40,7 +40,7 @@ class WeeklyCalculation < ActiveRecord::Base
40
40
 
41
41
  # Required hook to perform the calculation associated with the Root Calculation
42
42
  def perform_calculation
43
- update_attributes(:computed_value => rand())
43
+ update(:computed_value => rand())
44
44
  end
45
45
 
46
46
  # Required hook to create and queue the dependent work
@@ -95,7 +95,7 @@ class HourlyCalculation < ActiveRecord::Base
95
95
 
96
96
  # Required hook that computes the hourly value
97
97
  def perform_calculation
98
- update_attributes(:computed_value => rand())
98
+ update(:computed_value => rand())
99
99
  end
100
100
  end
101
101
  ```
@@ -16,7 +16,7 @@ module QueueProcessor
16
16
  unless parent_calculation && parent_calculation.should_cancel?
17
17
  self.perform_calculation
18
18
  end
19
- self.update_attributes(:completed => true)
19
+ self.update(:completed => true)
20
20
  Rails.logger.debug {"#{self.describe}: is done"}
21
21
 
22
22
  parent_calculation&.fire_events(:finish)
@@ -5,7 +5,7 @@ module QueueProcessor
5
5
 
6
6
  def reset_state_machines!
7
7
  reload
8
- update_attributes(:processing_at => nil,:calculation_state => 'available', :dependent_calculations_state => 'idle', :processing_state => 'idle')
8
+ update(:processing_at => nil,:calculation_state => 'available', :dependent_calculations_state => 'idle', :processing_state => 'idle')
9
9
  end
10
10
 
11
11
  def stuck?
@@ -1,3 +1,3 @@
1
1
  module QueueProcessor
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: queue-processor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Naegle
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-03 00:00:00.000000000 Z
11
+ date: 2021-08-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -114,7 +114,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
114
114
  - !ruby/object:Gem::Version
115
115
  version: '0'
116
116
  requirements: []
117
- rubygems_version: 3.1.2
117
+ rubygems_version: 3.2.22
118
118
  signing_key:
119
119
  specification_version: 4
120
120
  summary: A processing model for a main calculation and a set of dependent calculations.