taskinator 0.4.4 → 0.4.5
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 +4 -4
- data/Gemfile.lock +8 -8
- data/README.md +58 -5
- data/lib/taskinator/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f4b27d4976ed505d54439b1906801adea0948dd89aa98cc02edcba80bb3be4b6
|
4
|
+
data.tar.gz: a0014b64e79e81ce3265b3c6cb9bc74103e36a0943bff3586616f8904d168f4a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f02656db786b6455ca0b521d56daac3c3b92d55b699201a6c40a67792b73afcfa06699a9bd9bb92a6f689e63e92a6e997fea058f5218ee4df17274a26d4d261
|
7
|
+
data.tar.gz: aa4b36704cfb5ff3ca9c27d7446ce02aac1adb0e0f38a7c0eccdac6182e5214b5fba1f4f9fff363840e0ee7f9f4894b9575c33da60b273f187ec330533470331
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
taskinator (0.4.
|
4
|
+
taskinator (0.4.5)
|
5
5
|
builder (>= 3.2.2)
|
6
6
|
connection_pool (>= 2.2.0)
|
7
7
|
globalid (~> 0.3)
|
@@ -47,8 +47,8 @@ GEM
|
|
47
47
|
thor (>= 0.19.4, < 2.0)
|
48
48
|
tins (~> 1.6)
|
49
49
|
crass (1.0.6)
|
50
|
-
delayed_job (4.1.
|
51
|
-
activesupport (>= 3.0, <
|
50
|
+
delayed_job (4.1.10)
|
51
|
+
activesupport (>= 3.0, < 8.0)
|
52
52
|
diff-lcs (1.5.0)
|
53
53
|
docile (1.4.0)
|
54
54
|
e2mmap (0.1.0)
|
@@ -57,7 +57,7 @@ GEM
|
|
57
57
|
redis (>= 3.2, < 5.0)
|
58
58
|
globalid (0.6.0)
|
59
59
|
activesupport (>= 5.0)
|
60
|
-
i18n (1.
|
60
|
+
i18n (1.9.1)
|
61
61
|
concurrent-ruby (~> 1.0)
|
62
62
|
json (2.6.1)
|
63
63
|
loofah (2.13.0)
|
@@ -115,15 +115,15 @@ GEM
|
|
115
115
|
rspec-core (~> 3.10.0)
|
116
116
|
rspec-expectations (~> 3.10.0)
|
117
117
|
rspec-mocks (~> 3.10.0)
|
118
|
-
rspec-core (3.10.
|
118
|
+
rspec-core (3.10.2)
|
119
119
|
rspec-support (~> 3.10.0)
|
120
120
|
rspec-expectations (3.10.2)
|
121
121
|
diff-lcs (>= 1.2.0, < 2.0)
|
122
122
|
rspec-support (~> 3.10.0)
|
123
|
-
rspec-mocks (3.10.
|
123
|
+
rspec-mocks (3.10.3)
|
124
124
|
diff-lcs (>= 1.2.0, < 2.0)
|
125
125
|
rspec-support (~> 3.10.0)
|
126
|
-
rspec-rails (5.0
|
126
|
+
rspec-rails (5.1.0)
|
127
127
|
actionpack (>= 5.2)
|
128
128
|
activesupport (>= 5.2)
|
129
129
|
railties (>= 5.2)
|
@@ -136,7 +136,7 @@ GEM
|
|
136
136
|
sidekiq (>= 2.4.0)
|
137
137
|
rspec-support (3.10.3)
|
138
138
|
ruby2_keywords (0.0.5)
|
139
|
-
sidekiq (6.
|
139
|
+
sidekiq (6.4.0)
|
140
140
|
connection_pool (>= 2.2.2)
|
141
141
|
rack (~> 2.0)
|
142
142
|
redis (>= 4.2.0)
|
data/README.md
CHANGED
@@ -45,6 +45,28 @@ Or install it yourself as:
|
|
45
45
|
|
46
46
|
$ gem install taskinator
|
47
47
|
|
48
|
+
If you are using Taskinator within a Rails application, then add an initializer, such as
|
49
|
+
`config/initializers/taskinator.rb`, with the following configuration content:
|
50
|
+
|
51
|
+
```ruby
|
52
|
+
# config/initializers/taskinator.rb
|
53
|
+
Taskinator.configure do |config|
|
54
|
+
|
55
|
+
# configure the queue adapter to use
|
56
|
+
# can be :active_job, :delayed_job, :redis or :sidekiq
|
57
|
+
config.queue_adapter = :redis
|
58
|
+
|
59
|
+
# configure redis
|
60
|
+
config.redis = {
|
61
|
+
:url => 'redis://redis.example.com:7372/12',
|
62
|
+
:namespace => 'mynamespace'
|
63
|
+
}
|
64
|
+
|
65
|
+
end
|
66
|
+
```
|
67
|
+
|
68
|
+
See the configuration section below for more configuration details.
|
69
|
+
|
48
70
|
## Usage
|
49
71
|
|
50
72
|
### Definition
|
@@ -658,17 +680,20 @@ _NOTE:_ The configuration hash _must_ have symbolized keys.
|
|
658
680
|
|
659
681
|
```ruby
|
660
682
|
Taskinator.configure do |config|
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
|
683
|
+
|
684
|
+
# redis configuration
|
685
|
+
config.redis = {
|
686
|
+
:url => 'redis://redis.example.com:7372/12',
|
687
|
+
:namespace => 'mynamespace'
|
688
|
+
}
|
689
|
+
|
665
690
|
end
|
666
691
|
```
|
667
692
|
|
668
693
|
Or, alternatively, via an `ENV` variable
|
669
694
|
|
670
695
|
Set the `REDIS_PROVIDER` environment variable to the Redis server url.
|
671
|
-
E.g. On Heroku, with RedisGreen: set REDIS_PROVIDER=REDISGREEN_URL and Taskinator will use the
|
696
|
+
E.g. On Heroku, with RedisGreen: set `REDIS_PROVIDER=REDISGREEN_URL` and Taskinator will use the
|
672
697
|
value of the `REDISGREEN_URL` environment variable when connecting to Redis.
|
673
698
|
|
674
699
|
You may also use the generic `REDIS_URL` which may be set to your own private Redis server.
|
@@ -679,15 +704,37 @@ wiki page for more information.
|
|
679
704
|
|
680
705
|
### Queues
|
681
706
|
|
707
|
+
To configure the queue adapter to use, set `config.queue_adapter` to one of the following values:
|
708
|
+
|
709
|
+
* `:active_job`
|
710
|
+
* `:delayed_job`
|
711
|
+
* `:redis`
|
712
|
+
* `:sidekiq`
|
713
|
+
|
714
|
+
As follows:
|
715
|
+
|
716
|
+
```ruby
|
717
|
+
Taskinator.configure do |config|
|
718
|
+
|
719
|
+
# configure the queue adapter to use
|
720
|
+
# can be :active_job, :delayed_job, :redis or :sidekiq
|
721
|
+
config.queue_adapter = :redis
|
722
|
+
|
723
|
+
end
|
724
|
+
```
|
725
|
+
|
682
726
|
By default the queue names for process and task workers is `default`, however, you can specify
|
683
727
|
the queue names as follows:
|
684
728
|
|
685
729
|
```ruby
|
686
730
|
Taskinator.configure do |config|
|
731
|
+
|
732
|
+
# queue configuration
|
687
733
|
config.queue_config = {
|
688
734
|
:process_queue => :default,
|
689
735
|
:task_queue => :default
|
690
736
|
}
|
737
|
+
|
691
738
|
end
|
692
739
|
```
|
693
740
|
|
@@ -698,7 +745,10 @@ as `ActiveSupport::Notifications`.
|
|
698
745
|
|
699
746
|
```ruby
|
700
747
|
Taskinator.configure do |config|
|
748
|
+
|
749
|
+
# configure instrumenter to use
|
701
750
|
config.instrumenter = ActiveSupport::Notifications
|
751
|
+
|
702
752
|
end
|
703
753
|
```
|
704
754
|
|
@@ -706,7 +756,10 @@ Alternatively, you can use the built-in instrumenter for logging to the console
|
|
706
756
|
|
707
757
|
```ruby
|
708
758
|
Taskinator.configure do |config|
|
759
|
+
|
760
|
+
# configure instrumenter to use
|
709
761
|
config.instrumenter = Taskinator::ConsoleInstrumenter.new
|
762
|
+
|
710
763
|
end
|
711
764
|
```
|
712
765
|
|
data/lib/taskinator/version.rb
CHANGED
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.4.
|
4
|
+
version: 0.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Stefano
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-01-
|
11
|
+
date: 2022-01-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: redis
|
@@ -238,7 +238,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
238
238
|
- !ruby/object:Gem::Version
|
239
239
|
version: '0'
|
240
240
|
requirements: []
|
241
|
-
rubygems_version: 3.
|
241
|
+
rubygems_version: 3.2.3
|
242
242
|
signing_key:
|
243
243
|
specification_version: 4
|
244
244
|
summary: A simple orchestration library for running complex processes or workflows
|