taskinator 0.5.1 → 0.5.2

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: bad31a71a3faf459776cdd3babe99eeece9bc81f42ab2bea305e7e4663a21d2c
4
- data.tar.gz: '09b1def02fbf8232cd4fba28acc1b0145f0fc90bacc6e184690c312e4296a58d'
3
+ metadata.gz: 61a5df38d4a74fdeb8608d4968db7198d2176ce298a876161391d1cb4b2d34bb
4
+ data.tar.gz: 040d41584d148bd04ab6dde0278434b53689fe6d0e506271c2fd4c6d34c2ff46
5
5
  SHA512:
6
- metadata.gz: 5924489454c34a1c2f6769d379aaa7c0a9824fe7337f201403b67580fb512005fac1d06d9bf740666062c33b5fd2ab5c312e503c1f17d689f1a9a083ea7f8556
7
- data.tar.gz: 504b475299c8b34b49e981cee9f325593fa2112151c4e582bebb92400025f22e39e5904c17b81f4d3a4caf6a83e942cebfc057cd545edc44200265ba9643bc55
6
+ metadata.gz: 9fd50742a5248ca9c06a0f6f2dbefe5cca6196a1823276baa034614f5bde65f4850cb04f59fad47995b4767318a3c49874b5033290edea7084791792c9cb3421
7
+ data.tar.gz: 4879da6633c70180d7d724f0553905cf669d44a8cb67d1af290e5aa068f23bdcc1ab914bd06a72746f0804884122fd5b1a687ed4c47667c94368c4bf4fbf00df
data/CHANGELOG.md CHANGED
@@ -1,253 +1,257 @@
1
1
  v?.?.? - ?? ??? ????
2
2
  ---
3
3
 
4
+ v0.5.2 - 04 Oct 2024
5
+ ---
6
+ * Time arguments fix for Redis 5.0. Fixes #28
7
+
4
8
  v0.5.1 - 06 Jan 2023
5
9
  ---
6
- Include process definition in processes, tasks and payloads to aid debugging.
7
- Increased test coverage for process and task specs.
8
- Removed `statsd` instrumentation.
9
- Removed unused `Taskinator::Visitor::XmlVisitor` implementation.
10
- Various refactorings and clean ups.
11
- Bug fixes for process class when used as a sub-process
12
- Add handling for unknown types when deserializing old processes
13
- Raises `UnknownTypeError` when trying to invoke processes or Jobs of unknown types
10
+ * Include process definition in processes, tasks and payloads to aid debugging.
11
+ * Increased test coverage for process and task specs.
12
+ * Removed `statsd` instrumentation.
13
+ * Removed unused `Taskinator::Visitor::XmlVisitor` implementation.
14
+ * Various refactorings and clean ups.
15
+ * Bug fixes for process class when used as a sub-process
16
+ * Add handling for unknown types when deserializing old processes
17
+ * Raises `UnknownTypeError` when trying to invoke processes or Jobs of unknown types
14
18
 
15
19
  v0.5.0 - 18 Feb 2022
16
20
  ---
17
- Removed unused `ProcessWorker` class and related queue methods.
18
- Refactored `TestQueueAdapter` to correctly implement queue adapter for use in specs.
19
- Added deprecation for `Taskinator::Process::Concurrent#concurrency_method` option.
21
+ * Removed unused `ProcessWorker` class and related queue methods.
22
+ * Refactored `TestQueueAdapter` to correctly implement queue adapter for use in specs.
23
+ * Added deprecation for `Taskinator::Process::Concurrent#concurrency_method` option.
20
24
 
21
25
  v0.4.7 - 17 Feb 2022
22
26
  ---
23
- Use newer format for `pipelined` and `multi` requests in Redis.
27
+ * Use newer format for `pipelined` and `multi` requests in Redis.
24
28
 
25
29
  v0.4.6 - 12 Feb 2022
26
30
  ---
27
- Upgrade actionpack for [information vulnerability fix](https://github.com/virtualstaticvoid/taskinator/security/dependabot/3).
31
+ * Upgrade actionpack for [information vulnerability fix](https://github.com/virtualstaticvoid/taskinator/security/dependabot/3).
28
32
 
29
33
  v0.4.5 - 30 Jan 2022
30
34
  ---
31
- Upgrade sidekiq dependency for [CVE-2022-23837](https://github.com/advisories/GHSA-jrfj-98qg-qjgv).
35
+ * Upgrade sidekiq dependency for [CVE-2022-23837](https://github.com/advisories/GHSA-jrfj-98qg-qjgv).
32
36
 
33
37
  v0.4.4 - 17 Jan 2022
34
38
  ---
35
- Add support for `ActiveJob`.
39
+ * Add support for `ActiveJob`.
36
40
 
37
41
  v0.4.3 - 14 Jan 2022
38
42
  ---
39
- Add `#find_process` and `#find_task` methods to `Taskinator::Api`.
40
- Bug fix to API when enumerating processes.
41
- Updated dependencies.
43
+ * Add `#find_process` and `#find_task` methods to `Taskinator::Api`.
44
+ * Bug fix to API when enumerating processes.
45
+ * Updated dependencies.
42
46
 
43
47
  v0.4.2 - 16 Mar 2021
44
48
  ---
45
- Bug fix for process/task keys not expired upon completion.
49
+ * Bug fix for process/task keys not expired upon completion.
46
50
 
47
51
  v0.4.1 - 15 Mar 2021
48
52
  ---
49
- Optimisation to exclude sub-processes which don't have any tasks.
50
- Preparations for upgrade to Ruby 3 and ActiveSupport 6
53
+ * Optimisation to exclude sub-processes which don't have any tasks.
54
+ * Preparations for upgrade to Ruby 3 and ActiveSupport 6
51
55
 
52
56
  v0.4.0 - 4 Mar 2021
53
57
  ---
54
- Bug fix `job` tasks which have no arguments to the `perform` method.
55
- Added support for having `perform` method as a class method.
58
+ * Bug fix `job` tasks which have no arguments to the `perform` method.
59
+ * Added support for having `perform` method as a class method.
56
60
 
57
61
  v0.3.16 - 17 Feb 2021
58
62
  ---
59
- Bug fix to decrement pending counts for sequential tasks.
60
- Bug fix to allow concurrent tasks to be retried (via Resque) and to complete processes.
63
+ * Bug fix to decrement pending counts for sequential tasks.
64
+ * Bug fix to allow concurrent tasks to be retried (via Resque) and to complete processes.
61
65
 
62
66
  v0.3.15 - 22 Nov 2018
63
67
  ---
64
- Updated dependencies.
68
+ * Updated dependencies.
65
69
 
66
70
  v0.3.14 - 13 Jul 2018
67
71
  ---
68
- Updated dependencies.
69
- Removed gemnasium.
72
+ * Updated dependencies.
73
+ * Removed gemnasium.
70
74
 
71
75
  v0.3.13 - 23 Sep 2017
72
76
  ---
73
- Updated dependencies.
77
+ * Updated dependencies.
74
78
 
75
79
  v0.3.12 - 23 Sep 2017
76
80
  ---
77
- Spec fixes.
78
- Updated dependencies.
81
+ * Spec fixes.
82
+ * Updated dependencies.
79
83
 
80
84
  v0.3.11 - 1 Nov 2016
81
85
  ---
82
- Removed `redis-semaphore` gem and use INCRBY to track pending concurrent tasks instead.
83
- Added instrumentation using statsd.
84
- Bug fixes to key expiry logic.
85
- Refactored process and task state transistions.
86
+ * Removed `redis-semaphore` gem and use INCRBY to track pending concurrent tasks instead.
87
+ * Added instrumentation using statsd.
88
+ * Bug fixes to key expiry logic.
89
+ * Refactored process and task state transistions.
86
90
 
87
91
  v0.3.10 - 1 Nov 2016
88
92
  ---
89
- Added support for serializing to XML.
90
- Improvements to process and task states.
93
+ * Added support for serializing to XML.
94
+ * Improvements to process and task states.
91
95
 
92
96
  v0.3.9 - 12 Sep 2016
93
97
  ---
94
- Added benchmark for redis-mutex.
98
+ * Added benchmark for redis-mutex.
95
99
 
96
100
  v0.3.7 - 18 Aug 2016
97
101
  ---
98
- Bug fix to `option?` method.
102
+ * Bug fix to `option?` method.
99
103
 
100
104
  v0.3.6 - 11 Nov 2015
101
105
  ---
102
- Added visitor for performing clean up of completed processes/tasks.
103
- Performance improvement to instrumentation payload; removed references to task/process and use intrinsic types.
104
- Clean up of keys, via `cleanup` method use key expiry.
106
+ * Added visitor for performing clean up of completed processes/tasks.
107
+ * Performance improvement to instrumentation payload; removed references to task/process and use intrinsic types.
108
+ * Clean up of keys, via `cleanup` method use key expiry.
105
109
 
106
110
  v0.3.5 - 02 Nov 2015
107
111
  ---
108
- Updated the keys used when persisting processes and tasks in Redis, so they fall in the same key space.
109
- Added clean up code to remove data from Redis when a process completes.
110
- Introduced `Taskinator.generate_uuid` method
111
- Use Redis pipelined mode to persist processes and tasks.
112
- Added warning output to log if serialized arguments are bigger than 2MB.
113
- Introduced scoping for keys in Redis in order to better support multi-tenancy requirements.
114
- Added XmlVisitor for extracting processes/tasks into XML.
115
- Introduced `ProcessWorker` (incomplete) which will be used to incrementally build sub-process in order to speed up overall processing for big processes.
112
+ * Updated the keys used when persisting processes and tasks in Redis, so they fall in the same key space.
113
+ * Added clean up code to remove data from Redis when a process completes.
114
+ * Introduced `Taskinator.generate_uuid` method
115
+ * Use Redis pipelined mode to persist processes and tasks.
116
+ * Added warning output to log if serialized arguments are bigger than 2MB.
117
+ * Introduced scoping for keys in Redis in order to better support multi-tenancy requirements.
118
+ * Added XmlVisitor for extracting processes/tasks into XML.
119
+ * Introduced `ProcessWorker` (incomplete) which will be used to incrementally build sub-process in order to speed up overall processing for big processes.
116
120
 
117
121
  v0.3.3 - 29 Oct 2015
118
122
  ---
119
- Bug fix for options handling when defining processes using `define_concurrent_process`.
123
+ * Bug fix for options handling when defining processes using `define_concurrent_process`.
120
124
 
121
125
  v0.3.2 - 18 Sep 2015
122
126
  ---
123
- Bug fix to argument handling when using `create_process_remotely` method.
127
+ * Bug fix to argument handling when using `create_process_remotely` method.
124
128
 
125
129
  v0.3.1 - 16 Sep 2015
126
130
  ---
127
- Added redis-semaphore gem, for fix to concurrent processes completion logic.
131
+ * Added redis-semaphore gem, for fix to concurrent processes completion logic.
128
132
 
129
133
  v0.3.0 - 28 Aug 2015
130
134
  ---
131
- Added created_at and updated_at to process and task as attributes.
132
- Improved serialization visitor to include an optional converter block for deserialization of attribute values.
133
- Corrections to lazy loader logic and speed improvements.
134
- Removed JobWorker as it's no longer necessary.
135
- Improvements to instrumentation.
136
- Removed workflow gem, and refactored process and task to implement the basics instead.
137
- Several bug fixes.
135
+ * Added created_at and updated_at to process and task as attributes.
136
+ * Improved serialization visitor to include an optional converter block for deserialization of attribute values.
137
+ * Corrections to lazy loader logic and speed improvements.
138
+ * Removed JobWorker as it's no longer necessary.
139
+ * Improvements to instrumentation.
140
+ * Removed workflow gem, and refactored process and task to implement the basics instead.
141
+ * Several bug fixes.
138
142
 
139
143
  v0.2.0 - 31 Jul 2015
140
144
  ---
141
- Bug fix for `create_process_remotely` so that it returns the process uuid instead of nil.
142
- Removed reload functionality, since it isn't used anymore
143
- Added missing instrumentation events for task, job and subprocess completed events.
144
- Bug fix for when `sequential` or `concurrent` steps don't have any tasks to still continue processing.
145
- Refactoring to remove dead code and "reload" functionality.
146
- Improvements to console and rake to use console instrumenter.
147
- Consolidation of instrumentation events. Added `type` to payload.
148
- Improvements to error handling.
145
+ * Bug fix for `create_process_remotely` so that it returns the process uuid instead of nil.
146
+ * Removed reload functionality, since it isn't used anymore
147
+ * Added missing instrumentation events for task, job and subprocess completed events.
148
+ * Bug fix for when `sequential` or `concurrent` steps don't have any tasks to still continue processing.
149
+ * Refactoring to remove dead code and "reload" functionality.
150
+ * Improvements to console and rake to use console instrumenter.
151
+ * Consolidation of instrumentation events. Added `type` to payload.
152
+ * Improvements to error handling.
149
153
 
150
154
  v0.1.1 - 23 Jul 2015 [Yanked]
151
155
  ---
152
- Bug fix for option parameter handling.
156
+ * Bug fix for option parameter handling.
153
157
 
154
158
  v0.1.0 - 23 Jul 2015 [Yanked]
155
159
  ---
156
- Fixed issue with persistence of options passed to `create_process` on the respective `Process` and `Task` instances.
157
- Improvements to process creation logic.
158
- Namespaced instrumentation event names.
159
- Added process completed, cancelled and failed instrumentation events.
160
- Include additional data in the instrumentation payload. E.g. Process options and percentages.
161
- Refactored the way processes/tasks get queued, to prevent unnecessary queuing of contained processes/tasks.
162
- Removed `ProcessWorker` since it isn't needed anymore.
160
+ * Fixed issue with persistence of options passed to `create_process` on the respective `Process` and `Task` instances.
161
+ * Improvements to process creation logic.
162
+ * Namespaced instrumentation event names.
163
+ * Added process completed, cancelled and failed instrumentation events.
164
+ * Include additional data in the instrumentation payload. E.g. Process options and percentages.
165
+ * Refactored the way processes/tasks get queued, to prevent unnecessary queuing of contained processes/tasks.
166
+ * Removed `ProcessWorker` since it isn't needed anymore.
163
167
 
164
168
  v0.0.18 - 14 Jul 2015
165
169
  ---
166
- Fixed issue with `Taskinator::Api::Processes#each` method, which was causing a Segmentation fault.
167
- Added statistics information.
168
- Improved specifications code coverage.
170
+ * Fixed issue with `Taskinator::Api::Processes#each` method, which was causing a Segmentation fault.
171
+ * Added statistics information.
172
+ * Improved specifications code coverage.
169
173
 
170
174
  v0.0.17 - 11 Jul 2015
171
175
  ---
172
- Fixed issue with `Taskinator::Task#each` method, which was causing a Segmentation fault.
173
- Added `define_sequential_process` and `define_concurrent_process` methods for defining processes.
174
- Added `ConsoleInstrumenter` instrumenter implementation.
175
- Required `resque` for console and rake tasks, to make debugging easier
176
+ * Fixed issue with `Taskinator::Task#each` method, which was causing a Segmentation fault.
177
+ * Added `define_sequential_process` and `define_concurrent_process` methods for defining processes.
178
+ * Added `ConsoleInstrumenter` instrumenter implementation.
179
+ * Required `resque` for console and rake tasks, to make debugging easier
176
180
 
177
181
  v0.0.16 - 25 Jun 2015
178
182
  ---
179
- Added ability to enqueue the creation of processes; added a new worker, `CreateProcessWorker`
180
- Added support for instrumentation
181
- Improvements to error handling
182
- Bug fix for the persistence of the `queue` attribute for `Process` and `Task`
183
- Code clean up and additional specs added
183
+ * Added ability to enqueue the creation of processes; added a new worker, `CreateProcessWorker`
184
+ * Added support for instrumentation
185
+ * Improvements to error handling
186
+ * Bug fix for the persistence of the `queue` attribute for `Process` and `Task`
187
+ * Code clean up and additional specs added
184
188
 
185
189
  v0.0.15 - 28 May 2015
186
190
  ---
187
- Added ability to specify the queue to use when enqueing processes, tasks and jobs
188
- Improvements to specs for testing with sidekiq; added `rspec-sidekiq` as development dependency
189
- Gem dependencies updated as per Gemnasium advisory
191
+ * Added ability to specify the queue to use when enqueing processes, tasks and jobs
192
+ * Improvements to specs for testing with sidekiq; added `rspec-sidekiq` as development dependency
193
+ * Gem dependencies updated as per Gemnasium advisory
190
194
 
191
195
  v0.0.14 - 12 May 2015
192
196
  ---
193
- Bug fix for fail! methods
194
- Bug fix to parameter handling by for_each method
197
+ * Bug fix for fail! methods
198
+ * Bug fix to parameter handling by for_each method
195
199
 
196
200
  v0.0.13 - 11 May 2015
197
201
  ---
198
- Bug fix to `Taskinator::Api` for listing of processes; should only include top-level processes
199
- Gem dependencies updated as per Gemnasium advisory
202
+ * Bug fix to `Taskinator::Api` for listing of processes; should only include top-level processes
203
+ * Gem dependencies updated as per Gemnasium advisory
200
204
 
201
205
  v0.0.12 - 20 Apr 2015
202
206
  ---
203
- Gem dependencies updated as per Gemnasium advisory
207
+ * Gem dependencies updated as per Gemnasium advisory
204
208
 
205
209
  v0.0.11 - 2 Mar 2015
206
210
  ---
207
- Gem dependencies updated as per Gemnasium advisory
211
+ * Gem dependencies updated as per Gemnasium advisory
208
212
 
209
213
  v0.0.10 - 26 Feb 2015
210
214
  ---
211
- Documentation updates
215
+ * Documentation updates
212
216
 
213
217
  v0.0.9 - 19 Dec 2014
214
218
  ---
215
- Various bug fixes
216
- Added error logging
217
- Workflow states now include `complete` event
218
- Gem dependencies updated as per Gemnasium advisory
219
+ * Various bug fixes
220
+ * Added error logging
221
+ * Workflow states now include `complete` event
222
+ * Gem dependencies updated as per Gemnasium advisory
219
223
 
220
224
  v0.0.8 - 11 Nov 2014
221
225
  ---
222
- Added support for argument chaining with `for_each` and `transform`
223
- Documentation updates
224
- Gem dependencies updated as per Gemnasium advisory
226
+ * Added support for argument chaining with `for_each` and `transform`
227
+ * Documentation updates
228
+ * Gem dependencies updated as per Gemnasium advisory
225
229
 
226
230
  v0.0.7 - 16 Oct 2014
227
231
  ---
228
- Added better option handling; introduced `option?(key)` method
229
- Added support for definining the expected arguments for a process
230
- Gem dependencies updated as per Gemnasium advisory
232
+ * Added better option handling; introduced `option?(key)` method
233
+ * Added support for definining the expected arguments for a process
234
+ * Gem dependencies updated as per Gemnasium advisory
231
235
 
232
236
  v0.0.5 - 17 Sep 2014
233
237
  ---
234
- Various of bug fixes
235
- Improved error handling
236
- Added logging for queuing of processes, tasks and jobs
238
+ * Various of bug fixes
239
+ * Improved error handling
240
+ * Added logging for queuing of processes, tasks and jobs
237
241
 
238
242
  v0.0.4 - 12 Sep 2014
239
243
  ---
240
- Improvements to serialization; make use of GlobalID functionality
241
- Added support for "job" tasks; reusing existing workers as tasks
244
+ * Improvements to serialization; make use of GlobalID functionality
245
+ * Added support for "job" tasks; reusing existing workers as tasks
242
246
 
243
247
  v0.0.3 - 2 Sep 2014
244
248
  ---
245
- Added failure steps to workflow of processes and tasks
249
+ * Added failure steps to workflow of processes and tasks
246
250
 
247
251
  v0.0.2 - 12 Aug 2014
248
252
  ---
249
- Refactored how tasks are defined in definitions
253
+ * Refactored how tasks are defined in definitions
250
254
 
251
255
  v0.0.1 - 12 Aug 2014
252
256
  ---
253
- Initial release
257
+ * Initial release
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- taskinator (0.5.1)
4
+ taskinator (0.5.2)
5
5
  builder (>= 3.2.2)
6
6
  connection_pool (>= 2.2.0)
7
7
  globalid (>= 0.3)
@@ -115,13 +115,13 @@ module Taskinator
115
115
  transaction.hmset(
116
116
  self.key,
117
117
  :state, new_state,
118
- :updated_at, @updated_at
118
+ :updated_at, @updated_at.iso8601(3)
119
119
  )
120
120
 
121
121
  # also update the "root" process
122
122
  transaction.hset(
123
123
  process_key,
124
- :updated_at, @updated_at
124
+ :updated_at, @updated_at.iso8601(3)
125
125
  )
126
126
  end
127
127
  end
@@ -138,7 +138,7 @@ module Taskinator
138
138
  :error_type, error.class.name,
139
139
  :error_message, error.message,
140
140
  :error_backtrace, JSON.generate(error.backtrace || []),
141
- :updated_at, Time.now.utc
141
+ :updated_at, Time.now.utc.iso8601(3)
142
142
  )
143
143
  end
144
144
  end
@@ -182,7 +182,7 @@ module Taskinator
182
182
  process_key = self.process_key
183
183
  conn.multi do |transaction|
184
184
  transaction.hincrby process_key, "tasks_#{status}", 1
185
- transaction.hset process_key, :updated_at, Time.now.utc
185
+ transaction.hset process_key, :updated_at, Time.now.utc.iso8601(3)
186
186
  end
187
187
  end
188
188
  end
@@ -294,7 +294,8 @@ module Taskinator
294
294
  end
295
295
 
296
296
  def visit_attribute_time(attribute)
297
- visit_attribute(attribute)
297
+ value = @instance.send(attribute)
298
+ @hmset += [attribute, value.iso8601(3)] if value
298
299
  end
299
300
 
300
301
  def visit_attribute_enum(attribute, type)
@@ -1,3 +1,3 @@
1
1
  module Taskinator
2
- VERSION = "0.5.1"
2
+ VERSION = "0.5.2"
3
3
  end
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.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Stefano
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-07 00:00:00.000000000 Z
11
+ date: 2024-10-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redis
@@ -225,7 +225,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
225
225
  - !ruby/object:Gem::Version
226
226
  version: '0'
227
227
  requirements: []
228
- rubygems_version: 3.1.6
228
+ rubygems_version: 3.2.3
229
229
  signing_key:
230
230
  specification_version: 4
231
231
  summary: A simple orchestration library for running complex processes or workflows