capistrano_multiconfig_parallel 0.31.0 → 0.31.1

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: d75fa1db22835b3a4dffbca4b1a77ea7d57b64a5
4
- data.tar.gz: 711d8a286c0254a78d6cb99b2adc937df6aa1ac5
3
+ metadata.gz: 64b93504a5622842d235bd3e44e42dbe975e83ec
4
+ data.tar.gz: d8489a215a2cbad5b636ef1843d724e78c98e375
5
5
  SHA512:
6
- metadata.gz: fda9e4e843d9d791dd00085ba53e1dbf5389cf3bbd635e5ca3a7ff4929b5f706f68cc67cbc38927578bab519b134bb94c512814938979216d56c62589287f9e0
7
- data.tar.gz: dc2908a3203bf541c69eaa786f752a261b485067dc11aad375a8fe688ca6aa40404e1d43134831af12f0fbc2890dc7f642eb58202bb14a914c86779f6d7b1657
6
+ metadata.gz: 4909493b8341c11ba695ea555255329e704dd5685f3aa9958aa68febd6a8ad50bdc2a73a185fd2cc183f90c9868908b75d56fe11ca7d49f4a7ffa91bff8f488b
7
+ data.tar.gz: 13f6939093552b461d94e01a90528c546ad91f8a4b6245f3cf99fb608951ab183a816dd41fa8215002d4b8e62143e4e75dce35404f4a351b22a3da8de2bff95e
Binary file
@@ -22,7 +22,7 @@ module CapistranoMulticonfigParallel
22
22
  Celluloid.task_class = Celluloid::TaskThread
23
23
  Celluloid.exception_handler do |ex|
24
24
  unless ex.is_a?(Interrupt)
25
- log_error(ex, 'stderr')
25
+ rescue_error(ex, 'stderr')
26
26
  end
27
27
  end
28
28
  end
@@ -32,7 +32,7 @@ module CapistranoMulticonfigParallel
32
32
 
33
33
  def setup_em_error_handler
34
34
  EM.error_handler do|exception|
35
- log_to_file("Error during event loop for worker #{@job_id}: #{format_error(exception)}", job_id: @job_id)
35
+ log_error(exception, job_id: @job_id, output: 'stderr')
36
36
  EM.stop
37
37
  end
38
38
  end
@@ -43,7 +43,7 @@ module CapistranoMulticonfigParallel
43
43
 
44
44
  def rescue_exception(ex)
45
45
  log_to_file("Terminal Table client disconnected due to error #{ex.inspect}")
46
- log_error(ex, 'stderr')
46
+ rescue_error(ex, 'stderr')
47
47
  terminate
48
48
  end
49
49
 
@@ -6,7 +6,7 @@ module CapistranoMulticonfigParallel
6
6
  def initialize(*args)
7
7
  super(*args)
8
8
  rescue => exc
9
- log_error(exc, 'stderr')
9
+ rescue_error(exc, 'stderr')
10
10
  # fails silently
11
11
  end
12
12
  end
@@ -57,7 +57,7 @@ module CapistranoMulticonfigParallel
57
57
  command = build_capistrano_task(action)
58
58
  run_shell_command(command)
59
59
  rescue => ex
60
- log_error(ex, 'stderr')
60
+ rescue_error(ex, 'stderr')
61
61
  execute_standard_deploy('deploy:rollback') if action.blank? && @name == 'deploy'
62
62
  end
63
63
 
@@ -42,20 +42,20 @@ module CapistranoMulticonfigParallel
42
42
  [CapistranoMulticonfigParallel::CelluloidWorker::TaskFailed, SystemExit].find { |class_name| error.is_a?(class_name) }.present?
43
43
  end
44
44
 
45
- def log_error(error, output = nil)
46
- return if error_filtered?(error)
45
+ def log_error(error, options = {})
47
46
  message = format_error(error)
48
- log_output_error(output, message)
49
- log_to_file(message, log_method: 'fatal')
47
+ log_output_error(error, options.fetch(:output, nil), message)
48
+ log_to_file(message, options.merge(log_method: 'fatal'))
50
49
  end
51
50
 
52
51
  def terminal_actor
53
52
  Celluloid::Actor[:terminal_server]
54
53
  end
55
54
 
56
- def log_output_error(output, message)
55
+ def log_output_error(error, output, message)
56
+ return if error_filtered?(error)
57
57
  puts message if output.present?
58
- terminal_actor.errors.push(message) if terminal_actor.present? && terminal_actor.alive?
58
+ terminal_actor.errors.push(message) if terminal_actor.alive?
59
59
  end
60
60
 
61
61
  def format_error(exception)
@@ -119,7 +119,7 @@ module CapistranoMulticonfigParallel
119
119
  end
120
120
 
121
121
  def rescue_error(error, output = nil)
122
- log_error(error, output)
122
+ log_error(error, output: output)
123
123
  exit(1)
124
124
  end
125
125
 
@@ -8,7 +8,7 @@ module CapistranoMulticonfigParallel
8
8
  module VERSION
9
9
  MAJOR = 0
10
10
  MINOR = 31
11
- TINY = 0
11
+ TINY = 1
12
12
  PRE = nil
13
13
 
14
14
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano_multiconfig_parallel
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.31.0
4
+ version: 0.31.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - bogdanRada