isomorfeus-operation 2.4.0 → 2.5.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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3d509437f48b4c212e75b5470bf59b2bf47126769977a5a2d93dd860dfeaba5a
|
4
|
+
data.tar.gz: 6b4a6ba5a52892b738f4a02b26fc292809ae7ed7fbed7b2b263cb9ce65acf24b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9162ff6a772a1fcc61fd04629ab0961e0b8807fe09f7fd901d8286fe145b36d71a72ccc252df86039809949bb9d81fca229e906e0dace6f1f216d8a1b38df33f
|
7
|
+
data.tar.gz: 4b3d23e4cdb6263f977c61db6429d80152efbc2275c8459e426516727e75c4d7b6eceeb37869ca1aa2aa45b9a79e2cf0e9306ea0d7216a4aad18b0d0bd6918b6
|
@@ -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: :
|
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: :
|
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.
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
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
|
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
|
+
version: 2.5.0
|
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-
|
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.
|
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.
|
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.
|
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.
|
54
|
+
version: 3.13.13
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: opal
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -100,42 +100,42 @@ dependencies:
|
|
100
100
|
requirements:
|
101
101
|
- - '='
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: 2.
|
103
|
+
version: 2.5.0
|
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.
|
110
|
+
version: 2.5.0
|
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.
|
117
|
+
version: 2.5.0
|
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.
|
124
|
+
version: 2.5.0
|
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.
|
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.
|
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.
|
159
|
+
version: 2.5.0
|
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.
|
166
|
+
version: 2.5.0
|
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.
|
173
|
+
version: 2.5.0
|
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.
|
180
|
+
version: 2.5.0
|
181
181
|
- !ruby/object:Gem::Dependency
|
182
182
|
name: rake
|
183
183
|
requirement: !ruby/object:Gem::Requirement
|