foreman-tasks 0.8.5 → 0.8.6

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: 33e51f8a561fcf981de582b170e3a58a4be50b8b
4
- data.tar.gz: f77f1a81f93d978251f66018719d6efed2ba190d
3
+ metadata.gz: 75a0c194b28a59aafb23cc9b70c07cab8f0fb7b8
4
+ data.tar.gz: 192f323079a16cb61e860c817e18c76f1ad9c5c6
5
5
  SHA512:
6
- metadata.gz: 863173962400843217480075a4b8f274b7c335549cda126e64b68e90cfdc9c083750efd513fcbf1ad2e1c24a18f954ce4ffca2c529d877e0a55c068cda17f9cf
7
- data.tar.gz: d7272a600ccc1843276d89dc3caf9209af1839e6f3eb67f52d1d01f39bb092304b3ca5d66643c87f1fea6d8da816232e9260c05dd3e7309098f8e601489b3b03
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
- Daemons.run_proc(options[:process_name],
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
- begin
52
- ::Logging.reopen
53
- run(options[:foreman_root])
54
- rescue => e
55
- STDERR.puts e.message
56
- Foreman::Logging.exception("Failed running foreman-tasks daemon", e)
57
- exit 1
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
@@ -1,3 +1,3 @@
1
1
  module ForemanTasks
2
- VERSION = "0.8.5"
2
+ VERSION = "0.8.6"
3
3
  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.5
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-16 00:00:00.000000000 Z
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