serially 0.1.3 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/README.md +7 -2
- data/lib/serially/version.rb +1 -1
- data/serially.gemspec +3 -3
- metadata +7 -8
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZDI4ZDNhOGNmOWY5NzdmZDQ2ZmQ0MTk0YmRiMTcxZDVkZWIwNDg0Mw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZGMwODc1M2I1NWU5ZWQ4NTcyODlmM2I5ZTg3ZDI4OTU3ZjdhZjY2Mg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MTZiMjE0YzQwYTQxNzUyNWQwOThkMDc0MjA4OWU1MGM0YjllMzVjZjc1NjFk
|
10
|
+
Y2Q0MGI2MWMxYjFmY2RhNDI3MTYyNTIwZmE0M2NiMDU5NWY2M2QxMDdmYjFi
|
11
|
+
NTIzMTcyZmQzNjAzODAzMjFkNmQwZTJlMjEwYWUyZWNjZGU0OTA=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MmFmZWYxM2M4ODYxODRjNTYzNTE0ZDI3ZDE4MmI4MDU4ZjQ2N2E1OTAyYWZm
|
14
|
+
N2JiMWEyZjExMmU2MjJmOGFhNzNkZmMzZGM3NjNjMWFjZTQ2NGUzMmUwYzRi
|
15
|
+
ZmEyYTZmMjE2YzI3MGZhZjgxNjA5MzBjNzg5ZDMxM2Y3MmFkOTY=
|
data/README.md
CHANGED
@@ -5,11 +5,15 @@
|
|
5
5
|
|
6
6
|
Have you ever had a class that required a series of background tasks to run serially, strictly one after another? Than Serially is for you.
|
7
7
|
Declare the tasks using a simple DSL in the order you want them to to run. Serially will wrap them in a single job, and schedule it using Resque
|
8
|
-
in
|
8
|
+
in a queue you specify (or a default one). The next task will run only if previous one finished successfully. All task runs are written to DB and can be inspected (if
|
9
9
|
your class is an ActiveRecord object).
|
10
10
|
|
11
11
|
Check [this demo app][1] to see how Serially may be used in a Rails app.
|
12
12
|
|
13
|
+
Note: Serially is under active development. If there is anything you miss in it, please let me know!
|
14
|
+
|
15
|
+
Twitter: @mikepolis Email: mike AT polischuk DOT net
|
16
|
+
|
13
17
|
## Installation
|
14
18
|
|
15
19
|
Add this line to your application's Gemfile:
|
@@ -67,7 +71,8 @@ class Post < ActiveRecord::Base
|
|
67
71
|
end
|
68
72
|
```
|
69
73
|
|
70
|
-
After creating a Post, you can run `post.serially.start!` to schedule your Post tasks to run serially. They will run one after the other in the scope of the same `Serially::Job
|
74
|
+
After creating a Post, you can run `post.serially.start!` to schedule your Post tasks to run serially. They will run one after the other in the scope of the same `Serially::Job`
|
75
|
+
in the default `serially` queue.
|
71
76
|
An example run:
|
72
77
|
```ruby
|
73
78
|
post1 = Post.create(title: 'Critique of Pure Reason', author: 'Immanuel Kant') #=> <Post id: 1, title: 'Critique of Pure Reason'...>
|
data/lib/serially/version.rb
CHANGED
data/serially.gemspec
CHANGED
@@ -35,9 +35,9 @@ Gem::Specification.new do |spec|
|
|
35
35
|
|
36
36
|
spec.description = <<desc
|
37
37
|
Have you ever had a class that required a series of background tasks to run serially, strictly one after another? Than Serially is for you.
|
38
|
-
|
39
|
-
|
40
|
-
|
38
|
+
Declare the tasks using a simple DSL in the order you want them to to run. Serially will wrap them in a single job, and schedule it using Resque
|
39
|
+
in a queue you specify (or a default one). The next task will run only if previous one finished successfully. All task runs are written to DB and can be inspected (if
|
40
|
+
your class is an ActiveRecord object).
|
41
41
|
desc
|
42
42
|
|
43
43
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: serially
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Polischuk
|
@@ -167,15 +167,14 @@ dependencies:
|
|
167
167
|
description: ! 'Have you ever had a class that required a series of background tasks
|
168
168
|
to run serially, strictly one after another? Than Serially is for you.
|
169
169
|
|
170
|
-
|
171
|
-
|
170
|
+
Declare the tasks using a simple DSL in the order you want them to to run. Serially
|
171
|
+
will wrap them in a single job, and schedule it using Resque
|
172
172
|
|
173
|
-
|
174
|
-
|
173
|
+
in a queue you specify (or a default one). The next task will run only if previous
|
174
|
+
one finished successfully. All task runs are written to DB and can be inspected
|
175
|
+
(if
|
175
176
|
|
176
|
-
|
177
|
-
latter, all task runs results are written to serially_tasks table which you can
|
178
|
-
interrogate pragmatically using Serially::TaskRun model.
|
177
|
+
your class is an ActiveRecord object).
|
179
178
|
|
180
179
|
'
|
181
180
|
email:
|