codeclimate 0.8.1 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cc/analyzer/container.rb +12 -3
- data/lib/cc/analyzer/engine.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 38fba4f67389a2824e38e0fe2bc6d6bab49bca4c
|
4
|
+
data.tar.gz: 9d0cecd1caa99220b028f3b789cc0386f09f67ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 09e8478a66d99268866a09c31896cafb9d1dace0b684ca43c764491ae8823375973af9a5edb9aa02eb78f3cfb9245e06723e986afd3bbd488023dd8c6c50fc0b
|
7
|
+
data.tar.gz: 0e71a463a9d87e5f35c06f0902c2c9c020a3d761b7506f1217fa416b6881e163e2afd6644b657fdcd1c34f07884d4edd2ae74ce29e4db715a97bff726228c091
|
@@ -44,13 +44,13 @@ module CC
|
|
44
44
|
started = Time.now
|
45
45
|
@listener.started(container_data)
|
46
46
|
|
47
|
-
pid, _, out, err = POSIX::Spawn.popen4(*docker_run_command(options))
|
47
|
+
@pid, _, out, err = POSIX::Spawn.popen4(*docker_run_command(options))
|
48
48
|
|
49
49
|
t_out = read_stdout(out)
|
50
50
|
t_err = read_stderr(err)
|
51
|
-
t_timeout = timeout_thread(pid)
|
51
|
+
t_timeout = timeout_thread(@pid)
|
52
52
|
|
53
|
-
_, status = Process.waitpid2(pid)
|
53
|
+
_, status = Process.waitpid2(@pid)
|
54
54
|
|
55
55
|
duration = ((Time.now - started) * 1000).round
|
56
56
|
@listener.finished(container_data(duration: duration, status: status))
|
@@ -69,6 +69,15 @@ module CC
|
|
69
69
|
end
|
70
70
|
end
|
71
71
|
|
72
|
+
def stop
|
73
|
+
# Prevents the processing of more output after first error
|
74
|
+
@on_output = ->(*) { }
|
75
|
+
|
76
|
+
Process.kill("TERM", @pid) if @pid
|
77
|
+
rescue Errno::ESRCH
|
78
|
+
Analyzer.statsd.increment("container.kill_process_rescue")
|
79
|
+
end
|
80
|
+
|
72
81
|
private
|
73
82
|
|
74
83
|
def docker_run_command(options)
|
data/lib/cc/analyzer/engine.rb
CHANGED