capistrano_multiconfig_parallel 0.1.2 → 0.1.3
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5dc5369df42690fa5ef870983a214797511279f1
|
4
|
+
data.tar.gz: f88009806ea57b3592a5764fd11d9a462eed320f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 92e18862adee46ad87c6b367a4667d5b5042f4470d449aeed06e39f7064f363b803f47aff6eeeae50a5d700fa1288a846f8e2809910471a9dc4367fceebd2e90
|
7
|
+
data.tar.gz: e85230d220e7f440e38c3164113b70050432b09267120b0ae15e35c0caa759accd38806c1094b8f7ae821d7079c60e1bcde6863f1af515c9d076f580a0e8ceab
|
@@ -4,7 +4,7 @@ module CapistranoMulticonfigParallel
|
|
4
4
|
include Celluloid
|
5
5
|
include Celluloid::Logger
|
6
6
|
|
7
|
-
attr_accessor :actor, :pid, :exit_status, :process, :filename
|
7
|
+
attr_accessor :actor, :pid, :exit_status, :process, :filename,:worker_log
|
8
8
|
|
9
9
|
def finalize
|
10
10
|
EM.stop
|
@@ -18,9 +18,9 @@ module CapistranoMulticonfigParallel
|
|
18
18
|
def work(cmd, options = {})
|
19
19
|
@options = options
|
20
20
|
@actor = @options.fetch(:actor, nil)
|
21
|
+
set_worker_log
|
21
22
|
EM.run do
|
22
23
|
EM.next_tick do
|
23
|
-
set_worker_log
|
24
24
|
start_async_deploy(cmd, options)
|
25
25
|
end
|
26
26
|
@timer = EM::PeriodicTimer.new(0.1) do
|
@@ -38,6 +38,12 @@ module CapistranoMulticonfigParallel
|
|
38
38
|
FileUtils.mkdir_p(CapistranoMulticonfigParallel.log_directory)
|
39
39
|
@filename = File.join(CapistranoMulticonfigParallel.log_directory, "worker_#{@actor.job_id}.log")
|
40
40
|
FileUtils.rm_rf(@filename) if @options[:dry_run] || @actor.executed_dry_run != true
|
41
|
+
@worker_log = ::Logger.new(@filename)
|
42
|
+
@worker_log.level = ::Logger::Severity::DEBUG
|
43
|
+
@worker_log.formatter = proc do |severity, datetime, progname, msg|
|
44
|
+
date_format = datetime.strftime("%Y-%m-%d %H:%M:%S")
|
45
|
+
"[#{date_format}] #{severity} (#{progname}): #{msg}\n"
|
46
|
+
end
|
41
47
|
end
|
42
48
|
|
43
49
|
def check_exit_status
|
@@ -97,8 +103,8 @@ module CapistranoMulticonfigParallel
|
|
97
103
|
@process ||= process
|
98
104
|
end
|
99
105
|
|
100
|
-
def io_callback(
|
101
|
-
|
106
|
+
def io_callback(io, data)
|
107
|
+
@worker_log.debug("#{io.upcase} ---- #{data}")
|
102
108
|
end
|
103
109
|
end
|
104
110
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano_multiconfig_parallel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- bogdanRada
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-06-
|
11
|
+
date: 2015-06-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: celluloid-pmap
|