sidekiq-runner 0.0.6 → 0.0.7
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 025033989197d8f90e49cc3d314529f9a1e7bdc0
|
4
|
+
data.tar.gz: 3c395d4fac5b46bb4d016de49c5a234b8174d102
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 94fe6f473ce4a652ee8be9cdb5b06cd9a79a6203a0c5eae69a526733b90f7dfc502f72f2e33eb568dfa5b5ec855be080a48b0a4c4046b882b4ebfa0eda2de58e
|
7
|
+
data.tar.gz: 019d1ccceb4147afa6c9b81231940f9e6a9ba7557e00adf85c10d6ed052eb45b0efec0d3b57f3f74834ea84ae19ea4131d945d3adc8f975de74051c70a1ca872
|
@@ -8,7 +8,7 @@ module SidekiqRunner
|
|
8
8
|
|
9
9
|
def self.get
|
10
10
|
config = default.dup
|
11
|
-
config.
|
11
|
+
config.merge_config_file!
|
12
12
|
config
|
13
13
|
end
|
14
14
|
|
@@ -36,6 +36,8 @@ module SidekiqRunner
|
|
36
36
|
end
|
37
37
|
|
38
38
|
def options
|
39
|
+
create_directories!
|
40
|
+
|
39
41
|
{
|
40
42
|
daemonize: @daemonize,
|
41
43
|
port: @port,
|
@@ -46,8 +48,6 @@ module SidekiqRunner
|
|
46
48
|
}
|
47
49
|
end
|
48
50
|
|
49
|
-
private
|
50
|
-
|
51
51
|
def merge_config_file!
|
52
52
|
if File.exist?(config_file)
|
53
53
|
yml = YAML.load_file(config_file)
|
@@ -57,5 +57,9 @@ module SidekiqRunner
|
|
57
57
|
end
|
58
58
|
end
|
59
59
|
end
|
60
|
+
|
61
|
+
def create_directories!
|
62
|
+
FileUtils.mkdir_p(File.dirname(log_file))
|
63
|
+
end
|
60
64
|
end
|
61
65
|
end
|
@@ -26,8 +26,8 @@ module SidekiqRunner
|
|
26
26
|
|
27
27
|
def self.get
|
28
28
|
config = default.dup
|
29
|
-
config.
|
30
|
-
config.
|
29
|
+
config.merge_config_file!
|
30
|
+
config.sane?
|
31
31
|
config
|
32
32
|
end
|
33
33
|
|
@@ -52,7 +52,7 @@ module SidekiqRunner
|
|
52
52
|
|
53
53
|
# Top-level single instance configuration methods, partially for backward compatibility.
|
54
54
|
|
55
|
-
SidekiqInstance::CONFIG_FILE_ATTRIBUTES.each do |meth|
|
55
|
+
(SidekiqInstance::CONFIG_FILE_ATTRIBUTES + SidekiqInstance::RUNNER_ATTRIBUTES).each do |meth|
|
56
56
|
define_method("#{meth}=") do |val|
|
57
57
|
ensure_default_sidekiq!
|
58
58
|
@sidekiqs.each { |_, skiq| skiq.send("#{meth}=", val) }
|
@@ -81,8 +81,6 @@ module SidekiqRunner
|
|
81
81
|
end
|
82
82
|
end
|
83
83
|
|
84
|
-
private
|
85
|
-
|
86
84
|
def ensure_default_sidekiq!
|
87
85
|
add_instance('sidekiq_default') if empty?
|
88
86
|
end
|
@@ -1,7 +1,10 @@
|
|
1
1
|
module SidekiqRunner
|
2
2
|
class SidekiqInstance
|
3
3
|
|
4
|
-
|
4
|
+
RUNNER_ATTRIBUTES = [:bundle_env, :chdir, :requirefile]
|
5
|
+
RUNNER_ATTRIBUTES.each { |att| attr_accessor att }
|
6
|
+
|
7
|
+
CONFIG_FILE_ATTRIBUTES = [:concurrency, :verbose, :pidfile, :logfile]
|
5
8
|
CONFIG_FILE_ATTRIBUTES.each { |att| attr_accessor att }
|
6
9
|
|
7
10
|
attr_reader :name, :queues
|
@@ -50,6 +53,8 @@ module SidekiqRunner
|
|
50
53
|
end
|
51
54
|
|
52
55
|
def build_start_command
|
56
|
+
create_directories!
|
57
|
+
|
53
58
|
cmd = []
|
54
59
|
cmd << (bundle_env ? 'bundle exec sidekiq' : 'sidekiq')
|
55
60
|
cmd << '-d'
|
@@ -76,5 +81,12 @@ module SidekiqRunner
|
|
76
81
|
|
77
82
|
cmd.join(' ')
|
78
83
|
end
|
84
|
+
|
85
|
+
private
|
86
|
+
|
87
|
+
def create_directories!
|
88
|
+
FileUtils.mkdir_p(File.dirname(logfile))
|
89
|
+
FileUtils.mkdir_p(File.dirname(pidfile))
|
90
|
+
end
|
79
91
|
end
|
80
92
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sidekiq-runner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- FlavourSys Technology GmbH
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-07-
|
11
|
+
date: 2014-07-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|