Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kazuhiko Shiozaki
gitlab-ce
Commits
c84675ee
Commit
c84675ee
authored
Jan 29, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
satellites logs
parent
7121a58e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
1 deletion
+21
-1
lib/gitlab/satellite/logger.rb
lib/gitlab/satellite/logger.rb
+13
-0
lib/gitlab/satellite/satellite.rb
lib/gitlab/satellite/satellite.rb
+8
-1
No files found.
lib/gitlab/satellite/logger.rb
0 → 100644
View file @
c84675ee
module
Gitlab
module
Satellite
class
Logger
<
Gitlab
::
Logger
def
self
.
file_name
'satellites.log'
end
def
format_message
(
severity
,
timestamp
,
progname
,
msg
)
"
#{
timestamp
.
to_s
(
:long
)
}
:
#{
msg
}
\n
"
end
end
end
end
lib/gitlab/satellite/satellite.rb
View file @
c84675ee
...
...
@@ -13,6 +13,10 @@ module Gitlab
@project
=
project
end
def
log
message
Gitlab
::
Satellite
::
Logger
.
error
(
message
)
end
def
raise_no_satellite
raise
SatelliteNotExistError
.
new
(
"Satellite doesn't exist"
)
end
...
...
@@ -29,10 +33,13 @@ module Gitlab
output
,
status
=
popen
(
"git clone
#{
project
.
url_to_repo
}
#{
path
}
"
,
Gitlab
.
config
.
satellites
.
path
)
log
(
"PID:
#{
project
.
id
}
: git clone
#{
project
.
url_to_repo
}
#{
path
}
"
)
log
(
"PID:
#{
project
.
id
}
: ->
#{
output
}
"
)
if
status
.
zero?
true
else
Gitlab
::
GitLogger
.
error
(
"Failed to create satellite for
#{
project
.
name_with_namespace
}
"
)
log
(
"Failed to create satellite for
#{
project
.
name_with_namespace
}
"
)
false
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment