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
Jérome Perrin
gitlab-ce
Commits
27e63275
Commit
27e63275
authored
May 26, 2017
by
Gabriel Mazetto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add ActiveUsers Check
parent
13e88c93
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
6 deletions
+19
-6
lib/system_check/app/active_users_check.rb
lib/system_check/app/active_users_check.rb
+17
-0
lib/tasks/gitlab/check.rake
lib/tasks/gitlab/check.rake
+2
-6
No files found.
lib/system_check/app/active_users_check.rb
0 → 100644
View file @
27e63275
module
SystemCheck
module
App
class
ActiveUsersCheck
<
SystemCheck
::
BaseCheck
set_name
'Active users:'
def
multi_check
active_users
=
User
.
active
.
count
if
active_users
>
0
$stdout
.
puts
active_users
.
to_s
.
color
(
:green
)
else
$stdout
.
puts
active_users
.
to_s
.
color
(
:red
)
end
end
end
end
end
lib/tasks/gitlab/check.rake
View file @
27e63275
...
@@ -32,11 +32,11 @@ namespace :gitlab do
...
@@ -32,11 +32,11 @@ namespace :gitlab do
SystemCheck
::
App
::
ProjectsHaveNamespaceCheck
,
SystemCheck
::
App
::
ProjectsHaveNamespaceCheck
,
SystemCheck
::
App
::
RedisVersionCheck
,
SystemCheck
::
App
::
RedisVersionCheck
,
SystemCheck
::
App
::
RubyVersionCheck
,
SystemCheck
::
App
::
RubyVersionCheck
,
SystemCheck
::
App
::
GitVersionCheck
SystemCheck
::
App
::
GitVersionCheck
,
SystemCheck
::
App
::
ActiveUsersCheck
]
]
SystemCheck
.
run
(
'GitLab'
,
checks
)
SystemCheck
.
run
(
'GitLab'
,
checks
)
check_active_users
end
end
end
end
...
@@ -554,10 +554,6 @@ namespace :gitlab do
...
@@ -554,10 +554,6 @@ namespace :gitlab do
end
end
end
end
def
check_active_users
puts
"Active users:
#{
User
.
active
.
count
}
"
end
def
check_repo_integrity
(
repo_dir
)
def
check_repo_integrity
(
repo_dir
)
puts
"
\n
Checking repo at
#{
repo_dir
.
color
(
:yellow
)
}
"
puts
"
\n
Checking repo at
#{
repo_dir
.
color
(
:yellow
)
}
"
...
...
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