foreman-tasks 0.8.5 → 0.8.6
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/bin/dynflow-executor +3 -0
- data/extra/dynflow-debug.sh +7 -0
- data/lib/foreman_tasks/dynflow/daemon.rb +13 -9
- data/lib/foreman_tasks/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 75a0c194b28a59aafb23cc9b70c07cab8f0fb7b8
|
|
4
|
+
data.tar.gz: 192f323079a16cb61e860c817e18c76f1ad9c5c6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 93738395b7781693f7d0613ff1085406a97593e0a94049993a5ae623d511c7617f336b29e2923b503324d427456a6e56306656f51894132be047b9c1788b5efa
|
|
7
|
+
data.tar.gz: f5ffb4b22a8168074c3aaddc7ee57f591a6412349c90fc644865389b12647d0f9815c5775a18dcb1cd1012983f675e56fbf005ef65a77cfb8a89c98555d45c3a
|
data/bin/dynflow-executor
CHANGED
|
@@ -32,6 +32,9 @@ BANNER
|
|
|
32
32
|
opts.on('-f', '--foreman-root=PATH', "Path to Foreman Rails root path. By default '#{options[:foreman_root]}'") do |path|
|
|
33
33
|
options[:foreman_root] = path
|
|
34
34
|
end
|
|
35
|
+
opts.on('-c', '--executors-count=COUNT', 'Number of parallel executors to spawn. Overrides EXECUTORS_COUNT environment varaible.') do |count|
|
|
36
|
+
options[:executors_count] = count.to_i
|
|
37
|
+
end
|
|
35
38
|
end
|
|
36
39
|
|
|
37
40
|
args = opts.parse!(ARGV)
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# This file provides additional debug information for foreman-debug tool and is
|
|
4
|
+
# symlinked as /usr/share/foreman/script/foreman-debug.d/60-dynflow_debug
|
|
5
|
+
|
|
6
|
+
add_files /var/log/foreman/dynflow_executor*.log*
|
|
7
|
+
add_files /var/log/foreman/dynflow_executor*.output*
|
|
@@ -26,7 +26,8 @@ module ForemanTasks
|
|
|
26
26
|
pid_dir: "#{Rails.root}/tmp/pids",
|
|
27
27
|
log_dir: File.join(Rails.root, 'log'),
|
|
28
28
|
wait_attempts: 300,
|
|
29
|
-
wait_sleep: 1
|
|
29
|
+
wait_sleep: 1,
|
|
30
|
+
executors_count: (ENV['EXECUTORS_COUNT'] || 1).to_i }
|
|
30
31
|
options = default_options.merge(options)
|
|
31
32
|
FileUtils.mkdir_p(options[:pid_dir])
|
|
32
33
|
begin
|
|
@@ -41,20 +42,23 @@ module ForemanTasks
|
|
|
41
42
|
|
|
42
43
|
STDERR.puts("Dynflow Executor: #{command} in progress")
|
|
43
44
|
|
|
44
|
-
|
|
45
|
+
options[:executors_count].times do
|
|
46
|
+
Daemons.run_proc(options[:process_name],
|
|
47
|
+
:multiple => true,
|
|
45
48
|
:dir => options[:pid_dir],
|
|
46
49
|
:log_dir => options[:log_dir],
|
|
47
50
|
:dir_mode => :normal,
|
|
48
51
|
:monitor => true,
|
|
49
52
|
:log_output => true,
|
|
50
53
|
:ARGV => [command]) do |*args|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
54
|
+
begin
|
|
55
|
+
::Logging.reopen
|
|
56
|
+
run(options[:foreman_root])
|
|
57
|
+
rescue => e
|
|
58
|
+
STDERR.puts e.message
|
|
59
|
+
Foreman::Logging.exception("Failed running foreman-tasks daemon", e)
|
|
60
|
+
exit 1
|
|
61
|
+
end
|
|
58
62
|
end
|
|
59
63
|
end
|
|
60
64
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: foreman-tasks
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.8.
|
|
4
|
+
version: 0.8.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ivan Nečas
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-11-
|
|
11
|
+
date: 2016-11-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: foreman-tasks-core
|
|
@@ -203,6 +203,7 @@ files:
|
|
|
203
203
|
- deploy/foreman-tasks.init
|
|
204
204
|
- deploy/foreman-tasks.service
|
|
205
205
|
- deploy/foreman-tasks.sysconfig
|
|
206
|
+
- extra/dynflow-debug.sh
|
|
206
207
|
- extra/dynflow-executor.example
|
|
207
208
|
- foreman-tasks.gemspec
|
|
208
209
|
- lib/foreman-tasks.rb
|