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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
de2b8456
Commit
de2b8456
authored
Jan 19, 2018
by
Valery Sizov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Geo status node update] Add information about last pulled status to geo:status rake task
parent
05d37640
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
lib/tasks/geo.rake
lib/tasks/geo.rake
+11
-1
No files found.
lib/tasks/geo.rake
View file @
de2b8456
...
...
@@ -211,7 +211,7 @@ namespace :geo do
task
status: :environment
do
abort
GEO_LICENSE_ERROR_TEXT
unless
Gitlab
::
Geo
.
license_allows?
COLUMN_WIDTH
=
35
COLUMN_WIDTH
=
40
current_node_status
=
GeoNodeStatus
.
current_node_status
geo_node
=
current_node_status
.
geo_node
...
...
@@ -265,5 +265,15 @@ namespace :geo do
print
cursor_last_event_id
puts
"(
#{
time_ago_in_words
(
Geo
::
EventLog
.
find_by
(
id:
cursor_last_event_id
)
&
.
created_at
)
}
ago)"
end
print
'Last status was pulled by primary node: '
.
rjust
(
COLUMN_WIDTH
)
if
current_node_status
.
updated_at
puts
"
#{
time_ago_in_words
(
current_node_status
.
updated_at
)
}
ago"
else
# Only primary node can create a status record in the database so if it's not exists
# we get not persistant AR record here.
puts
"Never"
end
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