sidecloq 0.4.6 → 0.4.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/sidecloq/schedule.rb +13 -1
- data/lib/sidecloq/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 369b9ecaad14a3f613c3c2a4afef4d3b439ceed861525ca99286668293fa61c8
|
4
|
+
data.tar.gz: 75f2d86e8ccaea4b089407eef5cf834f9ee7c0f31251b6a1acb72c5b43a15e78
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3b60ac764c22dbff7d9519a0f9ce8b8484da0b775e3b875506332d71d17bf377ab6655c92f966a3140a258fb684a440638d8941e0eba0a72e3b58d4dbbd75c2f
|
7
|
+
data.tar.gz: f5877e191dd1cbca6650e3f293c3a601aee96029a8034ecc6490bfd9badc3492d340b75aa2d508b6270decf8da75f46a3dce28d739ca75fe759d14a01e74bbc0
|
data/README.md
CHANGED
@@ -16,7 +16,7 @@ Recurring / Periodic / Scheduled / Cron job extension for
|
|
16
16
|
There are several options for running periodic tasks with Sidekiq,
|
17
17
|
including [sidekiq-scheduler](https://github.com/Moove-it/sidekiq-scheduler),
|
18
18
|
[sidekiq-cron](https://github.com/ondrejbartas/sidekiq-cron), as well as
|
19
|
-
[Sidekiq
|
19
|
+
[Sidekiq Enterprise](https://sidekiq.org/products/enterprise.html). Each tackles the
|
20
20
|
problem slightly differently. Sidecloq is inspired by various facets
|
21
21
|
of these projects, as well as
|
22
22
|
[resque-scheduler](https://github.com/resque/resque-scheduler). I urge
|
data/lib/sidecloq/schedule.rb
CHANGED
@@ -32,7 +32,7 @@ module Sidecloq
|
|
32
32
|
end
|
33
33
|
|
34
34
|
def self.from_hash(hash)
|
35
|
-
hash = hash[
|
35
|
+
hash = hash[env] if hash.key?(env)
|
36
36
|
|
37
37
|
specs = hash.each_with_object({}) do |(name, spec), memo|
|
38
38
|
memo[name] = spec.dup.tap do |s|
|
@@ -72,5 +72,17 @@ module Sidecloq
|
|
72
72
|
end
|
73
73
|
end
|
74
74
|
end
|
75
|
+
|
76
|
+
def self.env
|
77
|
+
rails_env || rack_env
|
78
|
+
end
|
79
|
+
|
80
|
+
def self.rails_env
|
81
|
+
Rails.env if defined?(Rails)
|
82
|
+
end
|
83
|
+
|
84
|
+
def self.rack_env
|
85
|
+
ENV['RACK_ENV']
|
86
|
+
end
|
75
87
|
end
|
76
88
|
end
|
data/lib/sidecloq/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sidecloq
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Robinson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-04-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sidekiq
|