isomorfeus-operation 2.4.1 → 2.5.1

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: 1322747420b02dedbbc5ad327b1d7d678f22b4f37dce5dd0eed5a71bb7623414
4
- data.tar.gz: cbe80622af6893f7ebea4bf823bbafba6031b7c8528ef5756cb87ebafdd920e5
3
+ metadata.gz: 2660224fc9b6ef9d3a9853eaaf19d06da34a34d526fe13a8f5c5eb4653bb2fc5
4
+ data.tar.gz: 184e9dbe1b37771d69b206b59d37b9146609da721578a371b949c0b83c7ba4df
5
5
  SHA512:
6
- metadata.gz: 8732d4b874968bccade8df2a920424cf68d4f8589d16f0d9b1e6429410dcdd109a182c437759c548af1fd1657e16687454a84dae4fc62698ed54b29b96304db1
7
- data.tar.gz: 4b030b3bb88c4e3ccc557598976536e5876e0d192fa3cd3d7d414f7f31e3ad0b873d0a7b057ef5e0fdfd0da6a992e2e058c985ea4f5260e623f86c9268fe596a
6
+ metadata.gz: fab7856009489657cce0036338e2187ab9bc28c79d545149b247ea34c91ae9492b05930a337321f84510191a12580cd87c61558f1cfc68530841da38bcdc9ff1
7
+ data.tar.gz: 126b5c7ad441e6b0cdeca2f986ada6187874302680b9899444d2377017fdc418395ee6a1a7303d416b6a1d786122899f3e623461b747e5862ef3b1b5b69d564e
@@ -10,7 +10,7 @@ module Isomorfeus
10
10
  attribute :props
11
11
  attribute :user_class_name, class: String, default: 'Anonymous'
12
12
  attribute :user_key, class: String, default: 'anonymous'
13
- attribute :state, class: String, required: true, index: :value, ensure: proc { |v| Isomorfeus::Operation::DailyTask::STATES.include?(v) ? v : 'ready' }
13
+ attribute :state, class: String, required: true, index: :yes, ensure: proc { |v| Isomorfeus::Operation::DailyTask::STATES.include?(v) ? v : 'ready' }
14
14
  attribute :exception
15
15
  attribute :rtime
16
16
  attribute :fail, default: true
@@ -10,7 +10,7 @@ module Isomorfeus
10
10
  attribute :props
11
11
  attribute :user_class_name, class: String, default: 'Anonymous'
12
12
  attribute :user_key, class: String, default: 'anonymous'
13
- attribute :state, class: String, required: true, index: :value, ensure: proc { |v| Isomorfeus::Operation::DeferredTask::STATES.include?(v) ? v : 'ready' }
13
+ attribute :state, class: String, required: true, index: :yes, ensure: proc { |v| Isomorfeus::Operation::DeferredTask::STATES.include?(v) ? v : 'ready' }
14
14
  attribute :exception
15
15
  attribute :rtime
16
16
 
@@ -52,16 +52,12 @@ module Isomorfeus
52
52
 
53
53
  def mark_as_running(task)
54
54
  result = false
55
- @task_class.object_expander.environment.transaction do
56
- task = @task_class.load(key: task.key)
57
- if task.rtime.nil? || (task.rtime - @rtime) >= @timer_task.execution_interval
58
- if task.state == 'ready'
59
- task.state = 'running'
60
- task.rtime = @rtime
61
- task.save
62
- result = true
63
- end
64
- end
55
+ task = @task_class.load(key: task.key)
56
+ if task && (task.rtime.nil? || (task.rtime - @rtime) >= @timer_task.execution_interval) && task.state == 'ready'
57
+ task.state = 'running'
58
+ task.rtime = @rtime
59
+ task.save
60
+ result = true
65
61
  end
66
62
  result
67
63
  end
@@ -1,5 +1,5 @@
1
1
  module Isomorfeus
2
2
  module Operation
3
- VERSION = '2.4.1'
3
+ VERSION = '2.5.1'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: isomorfeus-operation
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.1
4
+ version: 2.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Biedermann
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-04-26 00:00:00.000000000 Z
11
+ date: 2022-05-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -30,28 +30,28 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 1.1.9
33
+ version: 1.1.10
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 1.1.9
40
+ version: 1.1.10
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: oj
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 3.13.11
47
+ version: 3.13.13
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 3.13.11
54
+ version: 3.13.13
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: opal
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -86,56 +86,56 @@ dependencies:
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: 0.14.22
89
+ version: 0.14.24
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: 0.14.22
96
+ version: 0.14.24
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: isomorfeus-data
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - '='
102
102
  - !ruby/object:Gem::Version
103
- version: 2.4.1
103
+ version: 2.5.1
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - '='
109
109
  - !ruby/object:Gem::Version
110
- version: 2.4.1
110
+ version: 2.5.1
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: isomorfeus-policy
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - '='
116
116
  - !ruby/object:Gem::Version
117
- version: 2.4.1
117
+ version: 2.5.1
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - '='
123
123
  - !ruby/object:Gem::Version
124
- version: 2.4.1
124
+ version: 2.5.1
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: isomorfeus-preact
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
129
  - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: 10.7.1
131
+ version: 10.7.2
132
132
  type: :runtime
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: 10.7.1
138
+ version: 10.7.2
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: isomorfeus-redux
141
141
  requirement: !ruby/object:Gem::Requirement
@@ -156,28 +156,28 @@ dependencies:
156
156
  requirements:
157
157
  - - '='
158
158
  - !ruby/object:Gem::Version
159
- version: 2.4.1
159
+ version: 2.5.1
160
160
  type: :runtime
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
164
  - - '='
165
165
  - !ruby/object:Gem::Version
166
- version: 2.4.1
166
+ version: 2.5.1
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: isomorfeus
169
169
  requirement: !ruby/object:Gem::Requirement
170
170
  requirements:
171
171
  - - '='
172
172
  - !ruby/object:Gem::Version
173
- version: 2.4.1
173
+ version: 2.5.1
174
174
  type: :development
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
178
  - - '='
179
179
  - !ruby/object:Gem::Version
180
- version: 2.4.1
180
+ version: 2.5.1
181
181
  - !ruby/object:Gem::Dependency
182
182
  name: rake
183
183
  requirement: !ruby/object:Gem::Requirement