Commit c84675ee06dfc72c46c178ef40e30f03053dcc5a
1 parent
7121a58e
Exists in
master
and in
4 other branches
satellites logs
Showing
2 changed files
with
21 additions
and
1 deletions
Show diff stats
lib/gitlab/satellite/satellite.rb
| @@ -13,6 +13,10 @@ module Gitlab | @@ -13,6 +13,10 @@ module Gitlab | ||
| 13 | @project = project | 13 | @project = project |
| 14 | end | 14 | end |
| 15 | 15 | ||
| 16 | + def log message | ||
| 17 | + Gitlab::Satellite::Logger.error(message) | ||
| 18 | + end | ||
| 19 | + | ||
| 16 | def raise_no_satellite | 20 | def raise_no_satellite |
| 17 | raise SatelliteNotExistError.new("Satellite doesn't exist") | 21 | raise SatelliteNotExistError.new("Satellite doesn't exist") |
| 18 | end | 22 | end |
| @@ -29,10 +33,13 @@ module Gitlab | @@ -29,10 +33,13 @@ module Gitlab | ||
| 29 | output, status = popen("git clone #{project.url_to_repo} #{path}", | 33 | output, status = popen("git clone #{project.url_to_repo} #{path}", |
| 30 | Gitlab.config.satellites.path) | 34 | Gitlab.config.satellites.path) |
| 31 | 35 | ||
| 36 | + log("PID: #{project.id}: git clone #{project.url_to_repo} #{path}") | ||
| 37 | + log("PID: #{project.id}: -> #{output}") | ||
| 38 | + | ||
| 32 | if status.zero? | 39 | if status.zero? |
| 33 | true | 40 | true |
| 34 | else | 41 | else |
| 35 | - Gitlab::GitLogger.error("Failed to create satellite for #{project.name_with_namespace}") | 42 | + log("Failed to create satellite for #{project.name_with_namespace}") |
| 36 | false | 43 | false |
| 37 | end | 44 | end |
| 38 | end | 45 | end |